Skip to content

Commit

Permalink
Update security.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Smartappli authored Jun 6, 2024
1 parent 527f98e commit dbf7d59
Showing 1 changed file with 11 additions and 28 deletions.
39 changes: 11 additions & 28 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Bandit Security Scan
name: Flake8

on:
push:
Expand All @@ -13,36 +13,19 @@ permissions:
contents: read

jobs:
bandit-security-scan:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
name: Bandit Security Scan
flake8-lint:
runs-on: ubuntu-latest
name: Flake8 Lint
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout code
- name: Check out source repository
uses: actions/checkout@v4

- name: Set up Python
- name: Set up Python environment
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install bandit[sarif]
pip install .[all] -v
# Execute Bandit
- name: Run Bandit CLI
run: |
bandit -r ./llama_cpp -v --format sarif -o results.sarif
# Upload the SARIF file generated in the previous step
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@v3
python-version: "3.11"
cache: 'pip'
- name: flake8 Lint
uses: py-actions/flake8@v2.3.0
with:
sarif_file: results.sarif
update-pip: "true"
plugins: "flake8-bugbear flake8-bandit"

0 comments on commit dbf7d59

Please sign in to comment.