-
Notifications
You must be signed in to change notification settings - Fork 249
Whitelist lines ending in # nosec #121
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
+37
−17
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
4cd3ea5
nosec_lines for #108's issue
omergunal ae9e8e9
nosec_lines
omergunal 1735db7
added nosec_lines parameter
omergunal fb88051
Update vulnerabilities.py
omergunal d0e8ef0
Code edited
omergunal 8569aa4
unnecessary codes deleted
omergunal e8cddd0
passed nosec_lines on analyse_repo
omergunal 3d5867b
Added nosec_lines
omergunal 1502ee7
added empty nosec lines for tests
omergunal bed2f77
added nosec_lines
omergunal 69d0193
added empty nosec_lines for tests
omergunal 3cb5186
Added ignore-nosec argument
omergunal ec6d23a
Update vulnerabilities_test.py
omergunal 6f09912
unnecessary codes removed
omergunal 9c4dea6
added default nosec_lines
omergunal f4ebbff
Update vulnerabilities.py
omergunal 7c872a0
Update vulnerabilities.py
omergunal b943310
removed spaces
omergunal 175c235
new line between imports and codes
omergunal c79161c
Update __main__.py
omergunal ed13514
new line between imports and codes
omergunal 0928700
removed set() from nosec_lines
omergunal 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
added default nosec_lines
- Loading branch information
commit 9c4dea6e511f76abca8feb396ecf1e6f2e1565fb
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -172,7 +172,7 @@ def append_node_if_reassigned( | |
| def find_triggers( | ||
| nodes, | ||
| trigger_words, | ||
| nosec_lines | ||
| nosec_lines = set() | ||
| ): | ||
| """Find triggers from the trigger_word_list in the nodes. | ||
|
|
||
|
|
@@ -470,7 +470,7 @@ def find_vulnerabilities_in_cfg( | |
| ui_mode, | ||
| blackbox_mapping, | ||
| vulnerabilities_list, | ||
| nosec_lines | ||
| nosec_lines = set() | ||
|
Collaborator
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. So this shouldn't be necessary, (to make it default to empty set), we can just leave it as |
||
| ): | ||
| """Find vulnerabilities in a cfg. | ||
|
|
||
|
|
||
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.
Can you please do
nosec_lines=set()instead ofnosec_lines = set()? I thoughtfind_vulnerabilitieswas the only function that needed this, but you're right since we do callfind_triggersonce from a test herepyt/tests/vulnerabilities_test.py
Line 96 in a3b9951
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.
You can see some of these in the https://codeclimate.com/github/python-security/pyt/pull/121 output.