| name | sv-dev |
| description | Development workflow for Security Verifiers. Use when asked to run tests, lint code, format files, set up the development environment, or perform CI checks on the codebase. |
| metadata | {"author":"security-verifiers","version":"1.0"} |
Security Verifiers Development
Testing, linting, formatting, and development workflow for the Security Verifiers codebase.
Quick Start
make setup
source .venv/bin/activate
make check
Testing
Run All Tests
make test
Test Specific Environment
make test-env E=network-logs
make test-env E=config-verification
make test-env E=code-vulnerability
make test-env E=phishing-detection
make test-env E=redteam-attack
make test-env E=redteam-defense
Environment Shortcuts
make e1
make e2
make e3
make e4
make e5
make e6
Test Utils Package
make test-utils
Test with Coverage
make test-cov
Run Single Test
uv run pytest environments/sv-env-network-logs/sv_env_network_logs_test.py::TestNetworkLogParser::test_extracts_label_and_confidence -q
Linting and Formatting
Check Linting (no changes)
make lint
Fix Linting Issues
make lint-fix
Format Code
make format
Quick Fix (lint + format)
make quick-fix
Pre-commit Hooks
make pre-commit
This runs:
- Ruff linting
- Ruff formatting
- Trailing whitespace removal
- End-of-file fixes
CI Checks
Run the same checks as CI:
make ci
This runs:
ruff check . --exit-non-zero-on-fix
pytest -q --tb=short
Environment Setup
Full Setup
make setup
Creates .venv, installs all environments and dev tools.
Manual Steps
make venv
make install
make install-dev
Install Security Tools (Ubuntu)
For E2 config-verification, install pinned tool versions:
make install-linux
make check-tools
Project Structure
security-verifiers/
├── environments/ # Environment packages
│ ├── sv-env-network-logs/
│ ├── sv-env-config-verification/
│ └── ...
├── sv_shared/ # Shared utilities (security-verifiers-utils)
├── scripts/ # Build, eval, data scripts
├── outputs/ # Evaluation outputs
└── skills/ # Agent skills
Common Workflows
Before Committing
make check
After Changing Environment Code
make test-env E=network-logs
make lint
After Changing Shared Code
make test-utils
make test
Cleaning Up
make clean
make clean-outputs
make clean-logs
make clean-all
File Watch (requires entr)
make watch
Automatically runs tests when Python files change.
Environment Info
make info
make list-envs
Troubleshooting
venv issues: make clean-all && make setup
Import errors: Ensure source .venv/bin/activate
Tool version mismatch: make check-tools then make install-linux
Pre-commit fails: make lint-fix && make format