Skip to content

Commit 39246f5

Browse files
feat: security skills scanner and enhanced code reviewer
Add Python security_skills module (10 checks) and enhanced TS reviewer (7 new rules) based on patterns from external security report findings. New security skill checks (SKILL-001 through SKILL-010): - Stub security functions (verify/validate always returning True) - Unsafe pickle deserialization without HMAC - Hardcoded security deny-lists discoverable by attackers - Unbounded collections enabling memory DoS - SSRF-vulnerable URL handling - Missing circuit breakers on external calls - ReDoS-susceptible regex patterns - Hardcoded secrets/API keys in source - Trust decisions without cryptographic verification - Exception details leaking internals to callers New TS reviewer rules (8-14): - stub-security-implementation (CRITICAL) - hardcoded-security-denylist (HIGH) - unsafe-deserialization (CRITICAL) - unbounded-collection (MEDIUM) - missing-circuit-breaker (MEDIUM) - ssrf-vulnerable-url (HIGH) - no-behavior-monitoring (MEDIUM) SDLC integration: - scripts/security_scan.py — CLI for pre-commit and CI use - .github/workflows/security-scan.yml — PR security scanning - 41 tests covering all skill checks with positive/negative cases Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 48e43a3 commit 39246f5

File tree

5 files changed

+1379
-0
lines changed

5 files changed

+1379
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Security Scan
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
security-skills-scan:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
17+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
18+
with:
19+
python-version: "3.11"
20+
- name: Run security skills scan
21+
run: |
22+
python scripts/security_scan.py packages/ \
23+
--exclude-tests \
24+
--min-severity high \
25+
--format text
26+
- name: Generate JSON report
27+
if: always()
28+
run: |
29+
python scripts/security_scan.py packages/ \
30+
--exclude-tests \
31+
--format json > security-scan-results.json
32+
- name: Upload scan results
33+
if: always()
34+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
35+
with:
36+
name: security-scan-results
37+
path: security-scan-results.json
38+
retention-days: 30

0 commit comments

Comments
 (0)