Skip to content

ci(contracts): run slither + aderyn against the post-PR-#684 contract suite and resolve findings #690

Closed

Description

@thiras

Context

PR #684 rewired the bulk of the contract suite (CapacityBond replacing StakingRegistry; new SafetyReserve, BuybackBurner, ContentBlacklist, FeeRouter distributor; DecdnGovernor rewired to ADR 036 served-bytes voting). The test plan deferred slither / aderyn static analysis to a follow-up.

Scope

  • Run the workflow's two analyzers locally and in CI against the new contracts:
    • (cd contracts && aderyn -o /tmp/aderyn.md --no-snippets --skip-update-check) — fail-on: high
    • (cd contracts && slither . --config-file slither.config.json) — fail-on: medium
  • Triage findings: fix or suppress with an in-line directive (slither disable-next-line / aderyn ignore-next-line) per the placement rules in CLAUDE.md § Solidity CI gotchas.
  • Confirm the GitHub Actions workflow's static-analysis jobs (the ones gated on the thresholds noted above) pass against main.

References

Activity

  1. added
    kind:security
    kind:test
    on May 28, 2026
  2. github-actions commented on May 28, 2026

    @github-actions

    🎯 Triage report

    This is a well-scoped CI/security hygiene task: run slither and aderyn against the new contract suite introduced in PR #684 (CapacityBond, SafetyReserve, BuybackBurner, ContentBlacklist, FeeRouter, DecdnGovernor), triage any findings, and confirm the static-analysis CI jobs pass. The task was explicitly deferred from PR #684's test plan and is a prerequisite for CI green on main.

    📊 Assessment

    Dimension Value Reasoning
    Type Task Defined workflow task with clear completion criteria; not a bug report or feature request
    Labels unchanged (security, technical, testing) Existing labels are accurate — static analysis is security-adjacent and the work is technical + test infrastructure
    Coding agent Suitable Clear commands, explicit success criteria (CI jobs pass), well-documented suppression patterns in CLAUDE.md § Solidity CI gotchas; no design decisions required

    🔗 Similar issues

    💡 Notes and suggestions

    Execution checklist:

    • Run (cd contracts && aderyn -o /tmp/aderyn.md --no-snippets --skip-update-check) locally; review /tmp/aderyn.md for high-severity findings.
    • Run (cd contracts && slither . --config-file slither.config.json) locally; review for medium+severity findings.
    • For each finding: either fix the root cause or suppress with a correctly-placed inline directive:
      • Slither: // slither-disable-next-line <detector> must be the immediate predecessor of the flagged line (no intervening comments).
      • Aderyn: // aderyn-ignore-next-line(<detector>) likewise must be the immediate predecessor.
    • Watch for the W5740 (unreachable code) trap in nonReentrant functions that always revert — drop nonReentrant on those stubs or restructure to avoid inlining.
    • Confirm FOUNDRY_PROFILE=ci forge build --sizes --deny warnings still passes after any suppressions (forge-lint warnings are fatal under CI profile).
    • Push and verify both the slither and aderyn GitHub Actions jobs pass on main.

    Common slither detectors likely to fire on this contract surface:

    • reentrancy-eth / reentrancy-no-eth — new contracts with external calls
    • unused-return on tuple destructuring — suppress at function level if safe by construction
    • divide-before-multiply in FeeRouter distribution math — check for precision loss

    Aderyn high-severity detectors to watch:

    • centralization-risk — admin/owner patterns in CapacityBond, SafetyReserve
    • unchecked-return — any low-level calls

    Generated by Agentic Triage for issue #690 · ● 1.5M · ◷

    Add this agentic workflows to your repo

    To install this agentic workflow, run

    gh aw add githubnext/agentics/workflows/issue-triage.md@94ec5db57374c5b04a4b8eef8b4413f9af44d63f
    
  3. self-assigned this
    on May 28, 2026
  4. added a commit that references this issue on May 28, 2026
    c27395b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind:securitykind:test

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions