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

Fixed code-scan workflow for the bandit #925

Merged
merged 5 commits into from
Apr 10, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Updated code_scan workflow to use tox (#924)
<!-- Contributing guide:
https://github.com/openvinotoolkit/datumaro/blob/develop/CONTRIBUTING.md
-->

### Summary

<!--
Resolves #111 and #222.
Depends on #1000 (for series of dependent commits).

This PR introduces this capability to make the project better in this
and that.

- Added this feature
- Removed that feature
- Fixed the problem #1234
-->

### How to test
<!-- Describe the testing procedure for reviewers, if changes are
not fully covered by unit tests or manual testing can be complicated.
-->

### Checklist
<!-- Put an 'x' in all the boxes that apply -->
- [ ] I have added unit tests to cover my changes.​
- [ ] I have added integration tests to cover my changes.​
- [ ] I have added the description of my changes into
[CHANGELOG](https://github.com/openvinotoolkit/datumaro/blob/develop/CHANGELOG.md).​
- [ ] I have updated the
[documentation](https://github.com/openvinotoolkit/datumaro/tree/develop/docs)
accordingly

### License

- [ ] I submit _my code changes_ under the same [MIT
License](https://github.com/openvinotoolkit/datumaro/blob/develop/LICENSE)
that covers the project.
  Feel free to contact the maintainers if that's a concern.
- [ ] I have updated the license header for each file (see an example
below).

```python
# Copyright (C) 2023 Intel Corporation
#
# SPDX-License-Identifier: MIT
```
yunchu authored Apr 10, 2023

Verified

This commit was signed with the committer’s verified signature. The key has expired.
Urhengulas Johann Hemmann
commit c425353d348a722696ef799dd376dd67c3e2a863
7 changes: 2 additions & 5 deletions .github/workflows/code_scan.yml
Original file line number Diff line number Diff line change
@@ -16,11 +16,8 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Run checks
run: |
pip install --user -r tests/requirements-linters.txt
echo "Bandit version: "`bandit --version | head -1`
bandit -r -c ipas_default.config ./ -f txt -o bandit-report.txt
- name: Bandit Scanning
run: run: tox -e bandit-scan
- name: Upload Bandit artifact
uses: actions/upload-artifact@v3
with:
10 changes: 8 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
[tox]
isolated_build = true
skip_missing_interpreters = true
envlist =
pre-commit


[testenv:pre-commit]
basepython = python3
deps =
pre-commit
commands = pre-commit run --show-diff-on-failure --color=always --all-files


[testenv:bandit-scan]
deps =
bandit
commands =
- bandit -r -c ipas_default.config ./ -f txt -o {toxworkdir}/bandit-report.txt