Skip to content

Add EVM security audit pipeline#405

Open
TUPM96 wants to merge 1 commit into
Smartdevs17:mainfrom
TUPM96:codex/security-audit-388
Open

Add EVM security audit pipeline#405
TUPM96 wants to merge 1 commit into
Smartdevs17:mainfrom
TUPM96:codex/security-audit-388

Conversation

@TUPM96
Copy link
Copy Markdown

@TUPM96 TUPM96 commented May 25, 2026

Closes #388

Summary

  • Adds an EVM Security Audit GitHub Actions workflow for Slither and Mythril.
  • Adds a reusable audit runner that normalizes tool findings, classifies severities, supports baselines, supports false-positive suppressions, and fails CI on new unsuppressed medium+ findings.
  • Creates contracts/evm audit configuration with Slither config, historical baseline tracking, and suppression metadata.
  • Documents local and CI usage in docs/security-audit.md.
  • Handles the current no-Solidity state cleanly by producing an empty report instead of failing until EVM contracts are added.

Validation

  • python -m py_compile scripts/security/run_evm_audit.py
  • python scripts/security/run_evm_audit.py --contracts-dir contracts/evm --out-dir security-reports/evm --baseline contracts/evm/security-baseline.json --suppressions contracts/evm/security-suppressions.json --severity-threshold medium --timeout 60
  • git diff --cached --check

Note: the repo currently has no .sol files under contracts/evm, so the local run validates the empty-contract path. The workflow installs Slither/Mythril and will scan/gate future Solidity sources added under that directory.

Copilot AI review requested due to automatic review settings May 25, 2026 12:49
@vercel
Copy link
Copy Markdown

vercel Bot commented May 25, 2026

@TUPM96 is attempting to deploy a commit to the smartdevs17's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds an EVM security audit pipeline that runs Slither + Mythril, normalizes findings, and gates CI on new findings above a severity threshold.

Changes:

  • Introduces a Python runner to execute Slither/Mythril, normalize findings, apply baseline/suppressions, and produce JSON + Markdown summaries.
  • Adds CI workflow to run the audit on PRs/pushes and upload artifacts.
  • Adds documentation and configuration scaffolding for baseline/suppressions and Slither config.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
scripts/security/run_evm_audit.py Implements the local/CI runner (tool execution, normalization, gating, reporting).
.github/workflows/security-audit.yml Wires the runner into CI with artifact upload and a step summary.
docs/security-audit.md Documents the pipeline behavior, gating, baseline, and suppressions.
contracts/evm/slither.config.json Provides Slither config used by the runner/workflow.
contracts/evm/security-suppressions.json Adds suppressions file scaffold for reviewed false positives.
contracts/evm/security-baseline.json Adds baseline file scaffold for accepted historical findings.
contracts/evm/README.md Documents local usage and the purpose of the EVM contracts/audit config directory.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +95 to +96
with path.open("r", encoding="utf-8") as handle:
return json.load(handle)
Comment on lines +44 to +53
self.severity = normalize_severity(self.severity)
fingerprint = "|".join(
[
self.tool,
self.check,
self.severity,
self.source,
compact(self.description),
]
)
Comment on lines +235 to +246
def apply_controls(findings: list[Finding], baseline_path: Path, suppressions_path: Path) -> None:
baseline_ids = load_baseline(baseline_path)
suppression_payload = load_json(suppressions_path, {"suppressions": []})
suppressions = suppression_payload.get("suppressions", []) or []

for finding in findings:
finding.baseline = finding.id in baseline_ids
for suppression in suppressions:
if suppression_matches(finding, suppression):
finding.suppressed = True
finding.suppression_reason = str(suppression.get("reason") or "suppressed")
break
Comment on lines +56 to +57
SEVERITY_THRESHOLD: ${{ inputs.severity_threshold || 'medium' }}
MYTHRIL_TIMEOUT: ${{ inputs.mythril_timeout || '900' }}
Comment on lines +25 to +28
mythril_timeout:
description: "Per-contract Mythril timeout in seconds"
required: false
default: "900"
--baseline contracts/evm/security-baseline.json \
--suppressions contracts/evm/security-suppressions.json \
--severity-threshold "$SEVERITY_THRESHOLD" \
--timeout "$MYTHRIL_TIMEOUT"
- name: Install analysis tools
run: |
python -m pip install --upgrade pip
python -m pip install slither-analyzer mythril
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.

Add automated security scanning pipeline with Slither and Mythril

2 participants