Skip to content
dngr2Public

About

Drop-in CI security gate + test scaffolder for the guard Foundry security checks (v4 hooks, Superchain interop, ERC-4337/7702).

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

guard-ci

A drop-in CI security gate for the guard Foundry security checks. One GitHub Action step and a scaffolded test turn each check into a red build when a contract regresses — no bespoke wiring per project.

It ties together three check libraries, each shipping a correct and a deliberately-broken reference so the checks are proven to bite:

  • v4-hookguard — Uniswap v4 hook footguns (unguarded callbacks, address-bitmap lint, "hook retains no value" invariant harness).
  • superchain-interop-guard — Superchain interop (crosschain mint/burn auth, cross-domain context, two-chain supply-conservation harness).
  • account-abstraction-guard — ERC-4337 / 7702 (execute() access control, UserOp signature validation, paymaster safety).

Quickstart

  1. Scaffold a security test for your contract (pick the type that fits):

    curl -sSL https://raw.githubusercontent.com/dngr2/guard-ci/main/bin/guard-scaffold -o guard-scaffold
    chmod +x guard-scaffold
    ./guard-scaffold paymaster MyPaymaster        # -> test/security/MyPaymaster.security.t.sol

    Types: hook, superchain-erc20, aa-account, paymaster.

  2. Install the matching guard and wire the one TODO (deploy your contract):

    forge install dngr2/account-abstraction-guard foundry-rs/forge-std
    forge test --match-path "test/security/**/*.t.sol"
  3. Gate CI — drop templates/security.yml into .github/workflows/:

    - uses: dngr2/guard-ci@v1
      with:
        test-path: test/security

That's it. Every push runs your security tests; a regression fails the build.

Complete, runnable example projects — each a scaffolded security test gating a correct contract, which turns red the moment you break it:

The Action

input default description
test-path test/security directory of your guard security tests (all *.t.sol under it run)
foundry-version stable Foundry toolchain version
verbosity -vv forge test verbosity
extra-args `` extra args appended to forge test

Why

The checks only prevent losses if teams actually run them. guard-ci removes the integration cost: scaffold, install, one CI step. It is a public good for anyone shipping a v4 hook, a SuperchainERC20, or a smart account — MIT, no token, no fees.

Built by dngr2.

About

Drop-in CI security gate + test scaffolder for the guard Foundry security checks (v4 hooks, Superchain interop, ERC-4337/7702).

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages