Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extensions: block direct use of private extensions #2555

Merged
merged 1 commit into from
May 7, 2019

Conversation

cmatsuoka
Copy link
Contributor

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

  • Have you followed the guidelines for contributing?
  • Have you signed the CLA?
  • Have you successfully run ./runtests.sh static?
  • Have you successfully run ./runtests.sh tests/unit?

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>
@cmatsuoka cmatsuoka mentioned this pull request May 6, 2019
6 tasks
Copy link
Collaborator

@sergiusens sergiusens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels like a trick, as it is actually and invalid extension name (the cli should block it first and this should be the last measure).

@codecov-io
Copy link

Codecov Report

Merging #2555 into master will decrease coverage by 0.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2555      +/-   ##
==========================================
- Coverage   88.86%   88.85%   -0.02%     
==========================================
  Files         202      202              
  Lines       13789    13791       +2     
  Branches     2085     2086       +1     
==========================================
  Hits        12254    12254              
- Misses       1092     1093       +1     
- Partials      443      444       +1
Impacted Files Coverage Δ
...raft/internal/project_loader/_extensions/_utils.py 95.78% <0%> (-2.06%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 16de5d3...22883bf. Read the comment docs.

@sergiusens sergiusens merged commit f945a7d into canonical:master May 7, 2019
clobrano pushed a commit to clobrano-forks/snapcraft that referenced this pull request Jun 8, 2019
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants