@@ -505,8 +505,6 @@ jobs:
505505 runs-on : ubuntu-latest
506506 permissions :
507507 contents : write
508- security-events : write
509- id-token : write
510508 steps :
511509 - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
512510 with :
@@ -650,38 +648,26 @@ jobs:
650648
651649 echo "=== All binaries clean (all engines completed) ==="
652650
653- # ── OpenSSF Scorecard ────────────────────────────────────
654- - name : Run OpenSSF Scorecard
655- uses : ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
656- id : scorecard
657- with :
658- results_file : scorecard.sarif
659- results_format : sarif
660- publish_results : true
661-
662- - name : Upload Scorecard SARIF
663- uses : github/codeql-action/upload-sarif@38697555549f1db7851b81482ff19f1fa5c4fedc # v4
664- with :
665- sarif_file : scorecard.sarif
666-
667- - name : Extract Scorecard score
668- id : score
651+ # ── OpenSSF Scorecard gate ──────────────────────────────────
652+ # Fetch public score and block release if repo health degrades below threshold.
653+ - name : OpenSSF Scorecard gate (minimum 4.0)
669654 run : |
670- SCORE=$(python3 -c "
671- import json, sys
672- with open('scorecard.sarif') as f:
673- d = json.load(f)
674- props = d.get('runs', [{}])[0].get('tool', {}).get('driver', {}).get('properties', {})
675- print(props.get('score', 'N/A'))
676- " 2>/dev/null || echo "N/A")
677- echo "score=$SCORE" >> "$GITHUB_OUTPUT"
655+ SCORE=$(curl -sf "https://api.scorecard.dev/projects/github.com/DeusData/codebase-memory-mcp" 2>/dev/null \
656+ | python3 -c "import json,sys; print(json.loads(sys.stdin.read()).get('score',0))" 2>/dev/null \
657+ || echo "0")
678658 echo "OpenSSF Scorecard: $SCORE/10"
659+ if python3 -c "exit(0 if float('$SCORE') >= 4.0 else 1)" 2>/dev/null; then
660+ echo "=== Scorecard gate passed (>= 4.0) ==="
661+ else
662+ echo "BLOCKED: Scorecard $SCORE/10 is below minimum 4.0"
663+ echo "Check https://scorecard.dev/viewer/?uri=github.com/DeusData/codebase-memory-mcp"
664+ exit 1
665+ fi
679666
680667 # ── Append results + publish ─────────────────────────────
681668 - name : Append security verification and publish release
682669 env :
683670 VT_ANALYSIS : ${{ steps.virustotal.outputs.analysis }}
684- SCORECARD_SCORE : ${{ steps.score.outputs.score }}
685671 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
686672 VERSION : ${{ inputs.version }}
687673 run : |
@@ -705,10 +691,6 @@ jobs:
705691 rm -f /tmp/vt_table
706692 fi
707693
708- # OpenSSF Scorecard
709- REPORT+=$'\n**OpenSSF Scorecard** — repository security health: **'"$SCORECARD_SCORE"$'/10**\n'
710- REPORT+=$'[View detailed scorecard](https://scorecard.dev/viewer/?uri=github.com/DeusData/codebase-memory-mcp)\n\n'
711-
712694 # Build provenance
713695 REPORT+=$'**Build Provenance (SLSA)** — cryptographic proof each binary was built by GitHub Actions from this repo:\n'
714696 REPORT+=$'```\ngh attestation verify <downloaded-file> --repo DeusData/codebase-memory-mcp\n```\n\n'
0 commit comments