Overview
Use the Cysmiq CLI to give a coding agent structured vulnerability context from repositories that Cysmiq already scans. The agent can connect a finding to the local code, explain the risk, implement a focused fix, and run the repository’s tests. The CLI queries existing Cysmiq results. It does not run a scan locally.Availability depends on your Cysmiq plan.
Prerequisites
- Install Cysmiq CLI
v0.0.8or later. See the CLI reference. - Connect and scan the repository in Cysmiq.
- Create a personal API key with
tenants:read,repositories:read, andvulnerabilities:readscopes. - Open the repository where the coding agent will work.
Configure the CLI
Set the API URL, workspace slug, and token in the environment where the agent runs:Configure the CLI environment
CYSMIQ_TOKEN in the environment or a local secret manager. Do not paste it into an agent prompt or commit it to the repository.
Verify access before asking the agent to investigate findings:
Verify workspace access
Install the Cysmiq skill
Install the official skill in the repository so the agent knows how to use the CLI safely.- Codex
- Claude Code
- Portable agents
Install for Codex
Verify the agent skill
Find a vulnerability
Start with a narrow list that includes only the fields the agent needs:List repository vulnerabilities
Example vulnerability list
--severity, --type, --state, --ref, or --sha to narrow a larger result set. Use --application in place of --repo when the task spans several repositories in one application.
Retrieve the evidence
Fetch the selected finding with locations, impacts, and call hierarchy analysis:Get vulnerability evidence
- The repository, file, and vulnerable line
- CWE and impact classifications
- The analyzed data flow from source to sink
- Exploitability reasoning and confidence
- Fixing advice and estimated fixing complexity
Ask the agent to fix it
Give the agent a bounded task that requires both Cysmiq evidence and local code evidence:Example agent request
- Retrieve the finding and relevant locations from Cysmiq.
- Verify the reported path and data flow in the local checkout.
- Implement a focused fix that matches the repository’s existing patterns.
- Run the relevant tests, linters, or build checks.
- Summarize the finding, changed code, and verification evidence.
Verify remediation
Push the fix so Cysmiq can scan the updated revision. Then query the relevant SHA or review the scan and vulnerability in the Cysmiq UI.Check a scanned commit
Keep agent access controlled
- Begin with read-only scopes for investigation and code changes.
- Add
vulnerabilities:writeonly when the agent is intentionally allowed to assign or triage findings. - Restrict personal API keys to the required workspaces when practical.
- Review agent-generated code and test results before merging.
- Use the finding ID, repository, and commit SHA to keep the task bounded.