← Back to issue list

extensions: block direct use of private extensions

View original Github issue

Metadata

Project
snapcraft
Number
#2555
Type
pull request
State
merged
Author
cmatsuoka
Labels
Created
Updated
Closed

Current evaluation

Merged into master. Blocks direct loading of private extensions whose names start with an underscore to prevent unanticipated internal usage. Approved by reviewer, passed CI, and introduced 16 lines across two files.

Suggested action:

No scores available.

Issue body

Don't directly load extensions if their name starts with an underscore. These extensions are internal and shouldn't be available for public consumption, to avoid spawn new unanticipated scenarios that need to be supported forever. Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com> - [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] Have you successfully run `./runtests.sh static`? - [x] Have you successfully run `./runtests.sh tests/unit`? -----

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged into master. Blocks direct loading of private extensions whose names start with an underscore to prevent unanticipated internal usage. Approved by reviewer, passed CI, and introduced 16 lines across two files.
qwen3.6-35b-a3b-mtp-q6 Merged into master. Prevents direct loading of private extensions prefixed with an underscore, keeping internal extensions unavailable to the public and avoiding unsupported usage scenarios.
qwen3.6-35b-a3b-mtp-q6 Merged into master. Blocks direct loading of private extensions by rejecting names starting with an underscore. Prevents public access to internal extensions to avoid unsupported scenarios. Passed static and unit tests.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#3781 extensions: refactor snapcraft merged Merged refactoring of extensions to prevent future cyclic import issues. Approved by reviewer, passed CI, and integrated into main. Reduced code by 163 lines across six files with a minor coverage decrease.
75%
#1589 feat: hide extensions with names prefixed with "_" charmcraft closed Closed after merging. Implements logic to hide extensions prefixed with an underscore, resolving issue #1586. Approved by a reviewer, the change spans 8 files with 36 additions and 10 deletions.
71%