-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/#149-add-support-for-import-linter-t…
…o-lint-tasks
- Loading branch information
Showing
11 changed files
with
463 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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 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,5 +1,7 @@ | ||
# Unreleased | ||
|
||
## ✨ Features | ||
## ✨ Added | ||
|
||
* #149: Added nox task to lint imports | ||
* #149: Added nox task to lint imports | ||
* #248: Added security results to workflow summary | ||
* #233: Added nox task to verify dependency declarations |
This file contains 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 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 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 |
---|---|---|
|
@@ -68,5 +68,6 @@ def check(session: Session) -> None: | |
python_files, | ||
) | ||
|
||
|
||
# isort: on | ||
# fmt: on |
This file contains 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 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 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,18 @@ | ||
Create test input | ||
|
||
$ cat > .security.json <<EOF | ||
> { | ||
> "result":[ | ||
> ] | ||
> } | ||
> EOF | ||
|
||
Run test case | ||
|
||
$ tbx security pretty-print .security.json | ||
# Security | ||
|
||
|File|line/<br>column|Cwe|Test ID|Details| | ||
|---|:-:|:-:|:-:|---| | ||
|
||
|
This file contains 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,81 @@ | ||
Create test input | ||
|
||
$ cat > .security.json <<EOF | ||
> { | ||
> "results":[ | ||
> { | ||
> "code": "555 subprocess.check_call(\n556 config.smv_postbuild_command, cwd=current_cwd, shell=True\n557 )\n558 if config.smv_postbuild_export_pattern != \"\":\n559 matches = find_matching_files_and_dirs(\n", | ||
> "col_offset": 16, | ||
> "end_col_offset": 17, | ||
> "filename": "exasol/toolbox/sphinx/multiversion/main.py", | ||
> "issue_confidence": "HIGH", | ||
> "issue_cwe": { | ||
> "id": 78, | ||
> "link": "https://cwe.mitre.org/data/definitions/78.html" | ||
> }, | ||
> "issue_severity": "HIGH", | ||
> "issue_text": "subprocess call with shell=True identified, security issue.", | ||
> "line_number": 556, | ||
> "line_range": [ | ||
> 555, | ||
> 556, | ||
> 557 | ||
> ], | ||
> "more_info": "https://bandit.readthedocs.io/en/1.7.10/plugins/b602_subprocess_popen_with_shell_equals_true.html", | ||
> "test_id": "B602", | ||
> "test_name": "subprocess_popen_with_shell_equals_true" | ||
> }, | ||
> { | ||
> "code": "156 )\n157 subprocess.check_call(cmd, cwd=gitroot, stdout=fp)\n158 fp.seek(0)\n", | ||
> "col_offset": 8, | ||
> "end_col_offset": 58, | ||
> "filename": "exasol/toolbox/sphinx/multiversion/git.py", | ||
> "issue_confidence": "HIGH", | ||
> "issue_cwe": { | ||
> "id": 78, | ||
> "link": "https://cwe.mitre.org/data/definitions/78.html" | ||
> }, | ||
> "issue_severity": "LOW", | ||
> "issue_text": "subprocess call - check for execution of untrusted input.", | ||
> "line_number": 157, | ||
> "line_range": [ | ||
> 157 | ||
> ], | ||
> "more_info": "https://bandit.readthedocs.io/en/1.7.10/plugins/b603_subprocess_without_shell_equals_true.html", | ||
> "test_id": "B603", | ||
> "test_name": "subprocess_without_shell_equals_true" | ||
> }, | ||
> { | ||
> "code": "159 with tarfile.TarFile(fileobj=fp) as tarfp:\n160 tarfp.extractall(dst)\n", | ||
> "col_offset": 12, | ||
> "end_col_offset": 33, | ||
> "filename": "exasol/toolbox/sphinx/multiversion/git.py", | ||
> "issue_confidence": "HIGH", | ||
> "issue_cwe": { | ||
> "id": 22, | ||
> "link": "https://cwe.mitre.org/data/definitions/22.html" | ||
> }, | ||
> "issue_severity": "HIGH", | ||
> "issue_text": "tarfile.extractall used without any validation. Please check and discard dangerous members.", | ||
> "line_number": 160, | ||
> "line_range": [ | ||
> 160 | ||
> ], | ||
> "more_info": "https://bandit.readthedocs.io/en/1.7.10/plugins/b202_tarfile_unsafe_members.html", | ||
> "test_id": "B202", | ||
> "test_name": "tarfile_unsafe_members" | ||
> } | ||
> ] | ||
> } | ||
> EOF | ||
|
||
Run test case | ||
|
||
$ tbx security pretty-print .security.json | ||
# Security | ||
|
||
|File|line/<br>column|Cwe|Test ID|Details| | ||
|---|:-:|:-:|:-:|---| | ||
|exasol/toolbox/sphinx/multiversion/git.py|line: 160<br>column: 12|22|B202|https://bandit.readthedocs.io/en/1.7.10/plugins/b202_tarfile_unsafe_members.html ,<br>https://cwe.mitre.org/data/definitions/22.html | | ||
|exasol/toolbox/sphinx/multiversion/git.py|line: 157<br>column: 8|78|B603|https://bandit.readthedocs.io/en/1.7.10/plugins/b603_subprocess_without_shell_equals_true.html ,<br>https://cwe.mitre.org/data/definitions/78.html | | ||
|exasol/toolbox/sphinx/multiversion/main.py|line: 556<br>column: 16|78|B602|https://bandit.readthedocs.io/en/1.7.10/plugins/b602_subprocess_popen_with_shell_equals_true.html ,<br>https://cwe.mitre.org/data/definitions/78.html | |
Oops, something went wrong.