@@ -45,36 +45,54 @@ jobs:
4545 echo "---" >> AUDIT_LOG.md
4646
4747 - name : Execute Cargo Deny Checks
48+ id : deny
4849 run : |
4950 echo "## 📦 Dependency License & Advisory Checks (cargo-deny)" >> AUDIT_LOG.md
5051 echo "\`\`\`text" >> AUDIT_LOG.md
51- cargo deny check licenses bans sources 2>&1 >> AUDIT_LOG.md || echo "cargo-deny failed or flagged warnings" >> AUDIT_LOG.md
52+ if cargo deny check licenses bans sources 2>&1 | tee -a AUDIT_LOG.md; then
53+ echo "deny_exit=0" >> "$GITHUB_OUTPUT"
54+ else
55+ echo "deny_exit=$?" >> "$GITHUB_OUTPUT"
56+ echo "::warning::cargo-deny flagged warnings or errors (see AUDIT_LOG.md)"
57+ fi
5258 echo "\`\`\`" >> AUDIT_LOG.md
5359 echo "---" >> AUDIT_LOG.md
5460
5561 - name : Execute Cargo Audit Sweeps
62+ id : audit
5663 run : |
5764 echo "## 🔍 Vulnerability Advisory Scans (cargo-audit)" >> AUDIT_LOG.md
5865 echo "\`\`\`text" >> AUDIT_LOG.md
59- cargo audit 2>&1 >> AUDIT_LOG.md || echo "cargo-audit detected critical vulnerability markers" >> AUDIT_LOG.md
66+ set +e
67+ cargo audit 2>&1 | tee -a AUDIT_LOG.md
68+ AUDIT_EXIT=$?
69+ set -e
6070 echo "\`\`\`" >> AUDIT_LOG.md
6171 echo "---" >> AUDIT_LOG.md
72+ if [ "$AUDIT_EXIT" -ne 0 ]; then
73+ echo "::error::cargo-audit found vulnerabilities (exit code $AUDIT_EXIT). See AUDIT_LOG.md for details."
74+ echo "audit_exit=$AUDIT_EXIT" >> "$GITHUB_OUTPUT"
75+ else
76+ echo "audit_exit=0" >> "$GITHUB_OUTPUT"
77+ fi
6278
63- - name : Mutants Gate — lending
79+ - name : Mutants Gate — propchain- lending
6480 run : |
6581 set -o pipefail
6682 echo "## 🧬 Mutation Gate: lending" >> AUDIT_LOG.md
6783 echo "\`\`\`text" >> AUDIT_LOG.md
68- cargo mutants -p lending --timeout 120 2>&1 | tee -a AUDIT_LOG.md
84+ cargo mutants -p propchain- lending --timeout 120 2>&1 | tee -a AUDIT_LOG.md
6985 echo "\`\`\`" >> AUDIT_LOG.md
86+ echo "---" >> AUDIT_LOG.md
7087
71- - name : Mutants Gate — bridge
88+ - name : Mutants Gate — propchain- bridge
7289 run : |
7390 set -o pipefail
7491 echo "## 🧬 Mutation Gate: bridge" >> AUDIT_LOG.md
7592 echo "\`\`\`text" >> AUDIT_LOG.md
76- cargo mutants -p bridge --timeout 180 2>&1 | tee -a AUDIT_LOG.md
93+ cargo mutants -p propchain- bridge --timeout 180 2>&1 | tee -a AUDIT_LOG.md
7794 echo "\`\`\`" >> AUDIT_LOG.md
95+ echo "---" >> AUDIT_LOG.md
7896
7997 - name : Mutants Gate — oracle
8098 run : |
@@ -83,12 +101,23 @@ jobs:
83101 echo "\`\`\`text" >> AUDIT_LOG.md
84102 cargo mutants -p oracle --timeout 120 2>&1 | tee -a AUDIT_LOG.md
85103 echo "\`\`\`" >> AUDIT_LOG.md
104+ echo "---" >> AUDIT_LOG.md
105+
106+ - name : Evaluate Audit Results
107+ if : always()
108+ run : |
109+ DENY_EXIT="${{ steps.deny.outputs.deny_exit }}"
110+ AUDIT_EXIT="${{ steps.audit.outputs.audit_exit }}"
111+ if [ "$DENY_EXIT" != "0" ] || [ "$AUDIT_EXIT" != "0" ]; then
112+ echo "::error::Security audit found issues. Review AUDIT_LOG.md and fix before proceeding."
113+ exit 1
114+ fi
86115
87116 - name : Commit and Push Security Results to Repo
88117 if : always()
89118 run : |
90119 git config --global user.name "github-actions[bot]"
91120 git config --global user.email "github-actions[bot]@users.noreply.github.com"
92121 git add AUDIT_LOG.md
93- git diff-index --quiet HEAD || git commit -m "chore(ci): update nightly AUDIT_LOG.md validation tracking profiles [skip ci]"
94- git push origin HEAD:${{ github.ref }}
122+ git diff-index --quiet HEAD || git commit -m "chore(ci): update nightly AUDIT_LOG.md [skip ci]"
123+ git push origin HEAD:${{ github.ref }}
0 commit comments