Skip to content

feat: integrate Semgrep for SAST security scanning #392

Description

@MatiasOS

Description

Integrate Semgrep as a static application security testing (SAST) tool to catch security vulnerabilities, anti-patterns, and dangerous code patterns in the OpenScan codebase.

Part of the Quality Tooling Rollout (#369).

Tasks

  • Set up Semgrep in CI via GitHub Actions (official semgrep/semgrep action)
  • Add Semgrep-supply-chain for dependency vulnerability scanning
  • Configure .semgrep.yml with rulesets relevant to the stack:
    • TypeScript/JavaScript security rules
    • React-specific rules (XSS, dangerous innerHTML, etc.)
    • Ethers.js / wagmi best practices
  • Configure PR annotations for findings
  • Add Semgrep badge to README

Motivation

Biome handles code style but doesn't cover security patterns. Semgrep catches:

  • Hardcoded secrets and API keys
  • SQL injection, XSS vectors
  • Insecure crypto patterns (relevant for a blockchain explorer)
  • Dependency supply-chain risks (via Semgrep Supply Chain)

Notes

  • Start with error level only in CI to avoid noise, then expand.
  • Consider running on a schedule (nightly) in addition to PR triggers for supply chain checks.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions