-
Notifications
You must be signed in to change notification settings - Fork 74
77 lines (62 loc) · 2.04 KB
/
security-analysis.yml
File metadata and controls
77 lines (62 loc) · 2.04 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Advanced Security Analysis
on:
push:
branches: ["main", "dev"]
pull_request:
branches: ["main", "dev"]
schedule:
- cron: '0 0 * * *' # Daily incremental analysis
jobs:
static-analysis:
name: Static Analysis & Custom Rules
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Semgrep
run: python3 -m pip install semgrep
- name: Run Semgrep Custom Protocol Rules
run: |
semgrep scan --config=.semgrep/soroban-rules.yaml --error --json -o semgrep-report.json || true
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install cargo-deny
run: cargo install cargo-deny --locked
- name: Run cargo-deny
run: cargo deny --manifest-path stellar-lend/Cargo.toml check --config stellar-lend/deny.toml advisories bans
- name: Upload Security Report
uses: actions/upload-artifact@v4
with:
name: security-dashboard-report
path: semgrep-report.json
coverage:
name: Incremental Security Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
stellar-lend/target
key: ${{ runner.os }}-cargo-tarpaulin-${{ hashFiles('stellar-lend/Cargo.lock') }}
- name: Install cargo-tarpaulin
run: cargo install cargo-tarpaulin || true
- name: Run coverage analysis
run: |
cd stellar-lend
cargo tarpaulin --verbose --workspace --exclude-files "*fuzz*" --out Xml
- name: Upload Coverage
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: stellar-lend/cobertura.xml