Refactor OTX Models #102
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
name: "Bandit scan" | |
on: pull_request | |
permissions: {} | |
jobs: | |
bandit-scan: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- id: files | |
uses: tj-actions/changed-files@dcc7a0cba800f454d79fff4b993e8c3555bcc0a8 # v45.0.7 | |
with: | |
files: | | |
**/*.py | |
**/*.pyx | |
**/*.pyi | |
- name: Setup Python | |
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 | |
with: | |
python-version: "3.12" | |
- name: Run checks | |
run: | | |
CHANGED_FILES="${{steps.files.outputs.all_changed_files}}" | |
if [[ ! -z $CHANGED_FILES ]]; then | |
pip install bandit | |
echo "Bandit version: "$(bandit --version | head -1) | |
echo "The files will be checked: "$(echo $CHANGED_FILES) | |
bandit -a file -r -c .ci/ipas_default.config $CHANGED_FILES | |
else | |
echo "No files with the \"py\" extension found" | |
fi |