Update OTX1.6.1 changelog (#3481) #487
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: Code Scanning | |
on: | |
workflow_dispatch: # run on request (no need for PR) | |
push: | |
branches: | |
- "releases/*" | |
- "v2" | |
schedule: | |
# every UTC 6PM from Mon to Fri | |
- cron: "0 18 * * 1-5" | |
# Declare default permissions as read only. | |
permissions: read-all | |
jobs: | |
Trivy-scan: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Set up Python | |
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
pip install --require-hashes --no-deps -r requirements/gh-actions.txt | |
pip-compile --extra=full -o requirements.txt setup.py | |
- name: Trivy Scanning (CSV) | |
uses: aquasecurity/trivy-action@d710430a6722f083d3b36b8339ff66b32f22ee55 # 0.19.0 | |
with: | |
trivy-config: ".ci/trivy-csv.yaml" | |
scan-type: "fs" | |
scan-ref: . | |
scanners: vuln,secret | |
- name: Trivy Scanning (spdx.json) | |
uses: aquasecurity/trivy-action@d710430a6722f083d3b36b8339ff66b32f22ee55 # 0.19.0 | |
with: | |
trivy-config: ".ci/trivy-json.yaml" | |
scan-type: "fs" | |
scan-ref: . | |
- name: Upload Trivy results artifact | |
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 | |
with: | |
name: trivy-results | |
path: trivy-results* | |
Bandit: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Set up Python | |
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
pip install --require-hashes --no-deps -r requirements/gh-actions.txt | |
pip-compile --generate-hashes -o ${{ runner.temp }}/requirements.txt requirements/dev.txt | |
pip install --require-hashes --no-deps -r ${{ runner.temp }}/requirements.txt | |
- name: Bandit Scanning | |
run: tox -e bandit-scan | |
- name: Upload Bandit artifact | |
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 | |
with: | |
name: bandit-report | |
path: .tox/bandit-report.txt | |
# Use always() to always run this step to publish scan results when there are test failures | |
if: ${{ always() }} |