-
Notifications
You must be signed in to change notification settings - Fork 7
Add guardrail in case manifest file does not exist #93
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
Merged
+153
−8
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# generated by rye | ||
# use `rye lock` or `rye sync` to update this lockfile | ||
# | ||
# last locked with the following flags: | ||
# pre: false | ||
# features: ["test"] | ||
# all-features: false | ||
# with-sources: false | ||
# generate-hashes: false | ||
# universal: false | ||
|
||
hatchling==1.27.0 | ||
hatch==1.14.0 | ||
argparse==1.4.0 | ||
# via socketsecurity | ||
certifi==2024.12.14 | ||
# via requests | ||
charset-normalizer==3.4.1 | ||
# via requests | ||
colorama==0.4.6 | ||
# via pytest-watch | ||
coverage==7.6.10 | ||
# via pytest-cov | ||
docopt==0.6.2 | ||
# via pytest-watch | ||
gitdb==4.0.12 | ||
# via gitpython | ||
gitpython==3.1.44 | ||
# via socketsecurity | ||
idna==3.10 | ||
# via requests | ||
iniconfig==2.0.0 | ||
# via pytest | ||
mdutils==1.6.0 | ||
# via socketsecurity | ||
packaging==24.2 | ||
# via pytest | ||
# via socketsecurity | ||
pluggy==1.5.0 | ||
# via pytest | ||
prettytable==3.12.0 | ||
# via socketsecurity | ||
pytest==8.3.4 | ||
# via pytest-asyncio | ||
# via pytest-cov | ||
# via pytest-mock | ||
# via pytest-watch | ||
# via socketsecurity | ||
pytest-asyncio==0.25.1 | ||
# via socketsecurity | ||
pytest-cov==6.0.0 | ||
# via socketsecurity | ||
pytest-mock==3.14.0 | ||
# via socketsecurity | ||
pytest-watch==4.2.0 | ||
# via socketsecurity | ||
python-dotenv==1.0.1 | ||
# via socketsecurity | ||
requests==2.32.3 | ||
# via socket-sdk-python | ||
# via socketsecurity | ||
smmap==5.0.2 | ||
# via gitdb | ||
socket-sdk-python==2.0.15 | ||
# via socketsecurity | ||
typing-extensions==4.12.2 | ||
# via socket-sdk-python | ||
urllib3==2.3.0 | ||
# via requests | ||
watchdog==6.0.0 | ||
# via pytest-watch | ||
wcwidth==0.2.13 | ||
# via prettytable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# generated by rye | ||
# use `rye lock` or `rye sync` to update this lockfile | ||
# | ||
# last locked with the following flags: | ||
# pre: false | ||
# features: ["test"] | ||
# all-features: false | ||
# with-sources: false | ||
# generate-hashes: false | ||
# universal: false | ||
|
||
argparse==1.4.0 | ||
# via socketsecurity | ||
certifi==2024.12.14 | ||
# via requests | ||
charset-normalizer==3.4.1 | ||
# via requests | ||
colorama==0.4.6 | ||
# via pytest-watch | ||
coverage==7.6.10 | ||
# via pytest-cov | ||
docopt==0.6.2 | ||
# via pytest-watch | ||
gitdb==4.0.12 | ||
# via gitpython | ||
gitpython==3.1.44 | ||
# via socketsecurity | ||
idna==3.10 | ||
# via requests | ||
iniconfig==2.0.0 | ||
# via pytest | ||
mdutils==1.6.0 | ||
# via socketsecurity | ||
packaging==24.2 | ||
# via pytest | ||
# via socketsecurity | ||
pluggy==1.5.0 | ||
# via pytest | ||
prettytable==3.12.0 | ||
# via socketsecurity | ||
pytest==8.3.4 | ||
# via pytest-asyncio | ||
# via pytest-cov | ||
# via pytest-mock | ||
# via pytest-watch | ||
# via socketsecurity | ||
pytest-asyncio==0.25.1 | ||
# via socketsecurity | ||
pytest-cov==6.0.0 | ||
# via socketsecurity | ||
pytest-mock==3.14.0 | ||
# via socketsecurity | ||
pytest-watch==4.2.0 | ||
# via socketsecurity | ||
python-dotenv==1.0.1 | ||
# via socketsecurity | ||
requests==2.32.3 | ||
# via socket-sdk-python | ||
# via socketsecurity | ||
smmap==5.0.2 | ||
# via gitdb | ||
socket-sdk-python==2.0.15 | ||
# via socketsecurity | ||
typing-extensions==4.12.2 | ||
# via socket-sdk-python | ||
urllib3==2.3.0 | ||
# via requests | ||
watchdog==6.0.0 | ||
# via pytest-watch | ||
wcwidth==0.2.13 | ||
# via prettytable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
__author__ = 'socket.dev' | ||
__version__ = '2.1.14' | ||
__version__ = '2.1.15' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,7 +130,7 @@ def main_code(): | |
files_to_check = set(json.loads(config.files)) # Start with manually specified files | ||
|
||
# Add git changes if this is a repo and we're not ignoring commit files | ||
if is_repo and not config.ignore_commit_files: | ||
if is_repo and not config.ignore_commit_files and not files_to_check: | ||
files_to_check.update(git_repo.changed_files) | ||
|
||
# Determine if we need to scan based on manifest files | ||
|
@@ -260,7 +260,7 @@ def main_code(): | |
output_handler.handle_output(diff) | ||
|
||
# Handle license generation | ||
if diff is not None and diff.id != "no_diff_id" and config.generate_license: | ||
if should_skip_scan and diff.id != "no_diff_id" and config.generate_license: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this correct? Or did you mean to check for whether NOT should_skip_scan here? |
||
all_packages = {} | ||
for purl in diff.packages: | ||
package = diff.packages[purl] | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be simplified to
else:
, no?