Skip to content

ci(security): add automated static security analysis and vulnerability scanning pipeline - #1952

Merged
K1NGD4VID merged 3 commits into
LabsCrypt:mainfrom
simplex001:feat/security-pipeline-1334
Nov 24, 2026
Merged

K1NGD4VID merged 3 commits into
LabsCrypt:mainfrom
simplex001:feat/security-pipeline-1334

Conversation

@simplex001

Copy link
Copy Markdown
Contributor

Overview & Background

Implements an automated static security analysis and vulnerability scanning pipeline in CI to detect supply chain vulnerabilities, secret leaks, and static code vulnerabilities on all pull requests and weekly scheduled runs.

Technical Changes

  1. Security Workflow (.github/workflows/security.yml):

    • Secret Leak Detection (secret-scanning): Integrated Gitleaks to scan repository history across all PRs with full commit history inspection.
    • Static Application Security Testing (semgrep-sast): Integrated Semgrep SAST scanning with automated SARIF output uploaded to the GitHub Security tab via github/codeql-action/upload-sarif@v3.
    • Supply Chain Vulnerability Scans: Ensured cargo audit checks Soroban contracts and npm audit --audit-level=high runs across all workspaces.
    • Automated Weekly Recurring Audit: Updated cron schedule to run weekly at 0 0 * * 0 (every Sunday at midnight UTC).
  2. Documentation (SECURITY.md):

    • Documented the automated continuous security pipeline covering supply chain scans, Gitleaks secret leak detection, Semgrep SAST with SARIF reporting, and weekly recurring scans.

Closes #1334

@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Comment thread .github/workflows/security.yml Fixed
Comment thread .github/workflows/security.yml Fixed

steps:
- name: Checkout code
uses: actions/checkout@v4
run: semgrep scan --config auto --sarif --output=semgrep.sarif || true

- name: Upload Semgrep SARIF report
uses: github/codeql-action/upload-sarif@v3
simplex001 and others added 3 commits November 24, 2026 13:58
Vitest only writes coverage when the run succeeds unless reportOnFailure
is set, so the PR coverage action was invoked against a missing
coverage-summary.json and failed with ENOENT. Generate the report on
failing runs and only post the comment when a summary exists.

Also fix the two backend lint errors: the bracket-access parse error in
webhook-auth.test.ts and the unused mock callback in token-registry.
gitleaks-action@v2 refuses to run in an organisation repository without a
paid GITLEAKS_LICENSE, so the job failed on every run. Install the
MIT-licensed CLI instead, and keep the default ruleset with a narrow
allowlist for the public Stellar contract addresses used by tests, seed
data and docs.
@simplex001
simplex001 force-pushed the feat/security-pipeline-1334 branch from 5f1b05c to e70c212 Compare November 24, 2026 14:03
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
@K1NGD4VID
K1NGD4VID merged commit 50872af into LabsCrypt:main Nov 24, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DevOps/Security] Automated Static Security Analysis & Vulnerability Scanning Pipeline

3 participants