-
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.34 KB
/
codeql-simple.yml
File metadata and controls
50 lines (41 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: "Security Scan (Simple)"
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
permissions:
contents: read
jobs:
security-scan:
name: Security Scan
runs-on: ubuntu-latest
# Only run on main repository to avoid permission issues
if: github.repository_owner == 'securebitsorg' || github.event_name != 'pull_request'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y python3-tk python3-pip zenity xterm
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install bandit safety
- name: Run Bandit security scan
run: |
bandit -r bash_script_maker.py syntax_highlighter.py -f json -o bandit-results.json || true
cat bandit-results.json | jq '.results' || echo "No critical issues found"
- name: Run Safety dependency check
run: |
safety check --file requirements.txt || echo "Safety check completed with warnings"
- name: Upload security results
uses: actions/upload-artifact@v4
if: always()
with:
name: security-scan-results
path: |
bandit-results.json
retention-days: 30