Retrieve and remediate DryRunSecurity findings, including one or multiple specific finding IDs. Use when the user asks to fix or propose fixes for PR scan findings, deepscan code findings, or SCA dependency findings. Resolve supplied finding IDs directly, or guide finding selection when IDs are unknown. Apply contextual fixes and create a fresh remediation PR when requested.
Pull DryRunSecurity findings via the API and apply contextual fixes. Unlike the remediation skill (which works on an already-open PR's comments), this skill retrieves findings by ID or scan and can create a fresh remediation PR.
Honor the requested delivery: for proposed fixes only, do not edit files, create a branch, commit, push, or open a PR. If edits are requested without commits, make the requested edits but do not commit, push, or open a PR. Honor any instruction to stay on the current branch. Do not repeat questions already answered in the request.
Prerequisite: The DRYRUN_API_KEY environment variable must be set. If missing, tell the user: "Set your API key with export DRYRUN_API_KEY=your-key." Never print its value.
The scripts/dryrun_api.py script uses Python 3 stdlib only. Resolve it relative to this installed skill directory, not the repository being remediated. Examples below use skill-relative paths.
python3 scripts/dryrun_api.py <command> [flags]Default API origin: https://simple-api.dryrun.security. Honor DRYRUN_API_BASE_URL when supplied, for example https://simple-api.sb.dryrun.security. It must be an HTTPS origin without credentials, a path, query, or fragment; redirects are not followed.
| Command | Required Flags | Optional Flags | Purpose |
|---|---|---|---|
list-accounts | (none) | (none) | List accessible accounts |
get-finding | --account-id, --finding-id | --finding-type | Get one exact finding, including source metadata |
list-repos | --account-id | --page, --per-page | List repos for an account |
list-scans | --account-id, --repo-id | --page, --per-page, --severity, --pr-number, --date-from, --date-to | List PR scans for a repo |
get-scan | --account-id, --repo-id, --scan-id | --findings-result, --page, --per-page | Get detailed scan findings |
list-deepscans | --account-id, --repo-id | (none) | Get latest deepscan for a repo |
get-deepscan-results | --account-id, --repo-id, --deepscan-id | --severity, --page, --per-page | Get deepscan code findings |
get-sca-results | --account-id, --repo-id, --deepscan-id | --severity, --page, --per-page | Get SCA findings |
Successful commands output JSON to stdout. get-finding returns { "data": { ... } } without removing null fields. HTTP/connection failures return JSON and exit nonzero; invalid CLI arguments are rejected before a request. Never treat an error as an empty finding list.
All commands except list-accounts require an account_id.
list-accounts. Use the sole accessible account when unambiguous; if there are multiple, present account_id, org_name, provider_type, and active and ask which to use.When the user supplies one or multiple finding IDs, read Finding ID Remediation. Deduplicate the IDs and call get-finding for each. These IDs are already the user's selection: skip Steps 1–3, including repository/scan selection and asking which findings to fix. Resolve every requested ID and validate repository/source metadata before continuing to Step 4.
If IDs were not supplied, use the known source or ask:
Would you like to remediate PR findings or Deepscan findings?
PR findings → read references/PR_REMEDIATION.md and follow that path
Deepscan findings → use the known type or ask:
Would you like to remediate SCA (dependency) findings or code findings?
references/SCA_REMEDIATION.md and follow that pathreferences/DEEPSCAN_REMEDIATION.md and follow that pathFollow the API call sequence in the chosen reference file. Each file documents the exact dryrun_api.py commands to run and the finding data shape for that path.
Present findings as a numbered list with ID, severity, type, file/line range, and a short description. For SCA findings also show package name, affected versions, advisory ID, and fixed version. Ask which findings to fix unless the user has already selected them.
For proposals only, keep the current checkout and skip branch creation.
Otherwise honor the supplied branch name and base branch. Ask only for missing decisions; suggest fix/<finding-type>-<short-description> for the new branch. If no base was supplied, use the scanned branch when available or the repository's default branch. Resolve conflicting source branches before combining findings.
Verify the intended repository and current worktree before switching. Preserve unrelated changes. Create the requested fresh branch from the agreed base before editing, or reuse it if it is already the explicitly selected remediation branch. Do not substitute an unrelated current feature branch. Treat the scanned SHA as provenance, not a requirement to branch from an old commit.
For each finding the user selected, follow this process:
Extract vulnerability type, file path, line numbers, and description from the API response. Each path's reference file documents the available fields.
Use Glob and Grep to search, Read to examine. Do NOT propose a fix until complete.
| Area | Search For |
|---|---|
| Config files | .env, package.json, requirements.txt, go.mod, Gemfile, pom.xml |
| Auth patterns | auth.py, authentication.rb, jwt.go, passport.js |
| Authz patterns | Permission models, RBAC, policy files |
| Decorators | @login_required, @requires_auth, requireAuth(), checkPermission() |
| Similar code | How does this codebase handle similar operations securely? |
Use the finding's evidence and verify whether the vulnerable behavior still exists on the chosen base, especially for historical, resolved, or dismissed findings. Explain already-fixed findings rather than manufacturing changes. See references/DRYRUN_FILTERING.md for code-finding filtering; SCA uses dependency-specific guidance.
Use WebFetch to look up official documentation. Do NOT rely on memorized examples.
Research sources:
references/VULNERABILITY_TYPES.mdUse docs for their specific framework version — security APIs change between versions.
For proposals only, describe the minimal patch without editing. Otherwise use Edit to make the minimal change necessary.
Requirements:
Include:
Skip this step for proposals only or when commits/PR creation were not authorized. Otherwise read references/PR_WORKFLOW.md and follow the PR creation workflow:
fix: <description>
Co-authored-by: DryRunSecurity <noreply@dryrun.security>Finding from API: "SQL Injection in app/handlers/search.go:45"
Before (vulnerable):
db.Raw("SELECT * FROM users WHERE name = '" + input + "'")After (fixed):
db.Where("name = ?", input).Find(&users)Research URLs:
https://cheatsheetseries.owasp.org/cheatsheets/SQL_Injection_Prevention_Cheat_Sheet.htmlhttps://gorm.io/docs/security.html918ad79
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.