Query DefectDojo findings
This plugin requires DefectDojo Pro.
Why this skill exists
Three failure modes make naive answers here worse than no answer:
- Invented numbers. Every count, severity and name must come from a tool
call in this session. Never estimate, never carry a number over from earlier
in the conversation without refetching if the user asked again.
- Unstated basis. DefectDojo can be configured to count only verified
findings. A count that does not say what it counted will be contradicted by
the UI and destroy trust in the whole integration.
- Wrong tool for the question. Neither the MCP tools nor the REST
o
ordering parameter can rank by priority. The only correct path is a
Pro-only priority bound plus ordering the page yourself, and reaching for
anything else produces a confidently wrong "top" list.
This skill is read-only. If the user asks to change anything, hand off to the
triage-findings skill instead.
Choosing the tool
Prefer MCP tools. They are purpose-built, token-efficient, and already scoped to
the user's permissions.
| Question shape |
Use |
| List or filter findings |
mcp__defectdojo__get_findings |
| One finding in detail |
mcp__defectdojo__get_finding_by_id |
| Counts, severity spread, average age, top CWEs |
mcp__defectdojo__finding_summary |
| Risk posture for one product |
mcp__defectdojo__risk_summary |
| Products, and their criticality or platform |
mcp__defectdojo__get_products |
| Product categories |
mcp__defectdojo__get_product_types |
| Engagements or tests |
mcp__defectdojo__get_engagements, mcp__defectdojo__get_tests |
| Users, groups, roles, membership |
mcp__defectdojo__get_users, get_user_by_id, get_groups, get_group_by_id, get_dojo_group_members, get_roles |
| Ranked by priority, or filtered by file path or component |
dd-api (see below) |
When to fall back to dd-api
get_findings cannot rank, and neither can the REST API's o ordering
parameter: priority is not an accepted ordering field, and asking for it
returns HTTP 400. What the REST API does support, and only on Pro, is bounding
by priority. So for anything phrased as "top", "worst", "highest risk", or
"what should we fix first": pull a bounded page through dd-api, then order it
yourself by the priority field in the response before presenting it.
dd-api get "/api/v2/findings/?active=true&priority_min=80&limit=50"
dd-api get "/api/v2/findings/?test__engagement__product=5&active=true&priority_min=60&limit=50"
Start at priority_min=80. If that returns nothing, step down to 60, then 40,
and say which threshold produced the list. Never pass o=-priority,
ordering=, or sort=: the first is rejected and the other two are silently
ignored, which is worse.
Priority is DefectDojo's own ranking. It weighs exploitability, threat
intelligence, reachability, business context and many more signals. When you
present a ranked list, say that DefectDojo ranks on risk rather than on severity
alone, and never present a closed list of the factors as if it were complete.
dd-api verifies that a priority-bounded query really came back with
priorities: if the instance answers with findings that carry no priority field
(what open source returns, since it ignores the bound instead of rejecting it),
the call exits 5 rather than handing you an unfiltered list. Report that as
"this instance does not support priority ranking", never as an empty result.
references/filter-cookbook.md has the exact parameter names and values for
both channels. Read it before constructing anything beyond a simple query.
Procedure
- Resolve names to identifiers first. Users say "the payments app", the API
wants a product id. Call
get_products with a name filter, and if more than
one plausibly matches, ask which one rather than guessing.
- Fetch. Prefer one summary call over many detail calls.
finding_summary
answers most "how many" questions in a single call.
- State the basis. If the instance enforces verified status, summary counts
cover verified findings only. Say which basis you used in one short clause,
for example "counting active verified findings".
- Present. Severity order is Critical, High, Medium, Low, Info. Use a
compact table for more than three findings, prose for fewer. Include the
finding id, because every other skill takes ids.
- Link. Add deep links with
dd-link finding <id> or
dd-link findings-open <product id> so a human can open the object.
- Offer the next step, do not take it. If findings clearly need triage, say
so and let the user ask.
Brief mode
When the user asks for a brief, standup summary, morning update, or "what
changed", follow this fixed recipe so consecutive briefs are comparable:
finding_summary scoped to the period, using the date parameter, for the
headline counts by severity.
- New findings in the period:
get_findings with the same date value and
status of Active.
- The top few by priority through
dd-api with o=-priority.
- Anything in Under Review or Risk Accepted worth a mention.
Keep it short enough to read out loud. Lead with what changed, not with totals
that did not move.
Rules
- Read-only. Never call a write endpoint from this skill, and never pass
--data to dd-api here.
- Never invent a count, a severity, a CWE, a product name, or a finding title.
- If a tool call fails with a connection, authentication, permission, or edition
error, stop and run the connection doctor instead of retrying blindly.
- Do not paginate endlessly. Ask for a narrower question when a result set is
large, and say how many you fetched out of how many exist.
1---2name: findings-query3description: Answer questions about DefectDojo security findings, products, engagements, tests, and risk posture, and produce a security brief. Use for questions like how many critical findings are open, what is our riskiest application, show me open SQL injection findings, what changed this week, which product has the worst backlog, what should we fix first, give me a security summary for standup, or top CWEs. Trigger even if the word DefectDojo never appears whenever the user asks about vulnerabilities, findings, scan results, security posture, or a security backlog and DefectDojo tools are available. Read-only, never changes finding state.4---56# Query DefectDojo findings78This plugin requires **DefectDojo Pro**.910## Why this skill exists1112Three failure modes make naive answers here worse than no answer:13141. **Invented numbers.** Every count, severity and name must come from a tool15 call in this session. Never estimate, never carry a number over from earlier16 in the conversation without refetching if the user asked again.172. **Unstated basis.** DefectDojo can be configured to count only verified18 findings. A count that does not say what it counted will be contradicted by19 the UI and destroy trust in the whole integration.203. **Wrong tool for the question.** Neither the MCP tools nor the REST `o`21 ordering parameter can rank by priority. The only correct path is a22 Pro-only priority bound plus ordering the page yourself, and reaching for23 anything else produces a confidently wrong "top" list.2425This skill is read-only. If the user asks to change anything, hand off to the26triage-findings skill instead.2728## Choosing the tool2930Prefer MCP tools. They are purpose-built, token-efficient, and already scoped to31the user's permissions.3233| Question shape | Use |34|---|---|35| List or filter findings | `mcp__defectdojo__get_findings` |36| One finding in detail | `mcp__defectdojo__get_finding_by_id` |37| Counts, severity spread, average age, top CWEs | `mcp__defectdojo__finding_summary` |38| Risk posture for one product | `mcp__defectdojo__risk_summary` |39| Products, and their criticality or platform | `mcp__defectdojo__get_products` |40| Product categories | `mcp__defectdojo__get_product_types` |41| Engagements or tests | `mcp__defectdojo__get_engagements`, `mcp__defectdojo__get_tests` |42| Users, groups, roles, membership | `mcp__defectdojo__get_users`, `get_user_by_id`, `get_groups`, `get_group_by_id`, `get_dojo_group_members`, `get_roles` |43| **Ranked by priority, or filtered by file path or component** | `dd-api` (see below) |4445### When to fall back to dd-api4647`get_findings` cannot rank, and neither can the REST API's `o` ordering48parameter: `priority` is not an accepted ordering field, and asking for it49returns HTTP 400. What the REST API does support, and only on Pro, is bounding50by priority. So for anything phrased as "top", "worst", "highest risk", or51"what should we fix first": pull a bounded page through `dd-api`, then order it52yourself by the `priority` field in the response before presenting it.5354```55dd-api get "/api/v2/findings/?active=true&priority_min=80&limit=50"56dd-api get "/api/v2/findings/?test__engagement__product=5&active=true&priority_min=60&limit=50"57```5859Start at `priority_min=80`. If that returns nothing, step down to 60, then 40,60and say which threshold produced the list. Never pass `o=-priority`,61`ordering=`, or `sort=`: the first is rejected and the other two are silently62ignored, which is worse.6364Priority is DefectDojo's own ranking. It weighs exploitability, threat65intelligence, reachability, business context and many more signals. When you66present a ranked list, say that DefectDojo ranks on risk rather than on severity67alone, and never present a closed list of the factors as if it were complete.6869`dd-api` verifies that a priority-bounded query really came back with70priorities: if the instance answers with findings that carry no priority field71(what open source returns, since it ignores the bound instead of rejecting it),72the call exits 5 rather than handing you an unfiltered list. Report that as73"this instance does not support priority ranking", never as an empty result.7475`references/filter-cookbook.md` has the exact parameter names and values for76both channels. Read it before constructing anything beyond a simple query.7778## Procedure79801. **Resolve names to identifiers first.** Users say "the payments app", the API81 wants a product id. Call `get_products` with a name filter, and if more than82 one plausibly matches, ask which one rather than guessing.832. **Fetch.** Prefer one summary call over many detail calls. `finding_summary`84 answers most "how many" questions in a single call.853. **State the basis.** If the instance enforces verified status, summary counts86 cover verified findings only. Say which basis you used in one short clause,87 for example "counting active verified findings".884. **Present.** Severity order is Critical, High, Medium, Low, Info. Use a89 compact table for more than three findings, prose for fewer. Include the90 finding id, because every other skill takes ids.915. **Link.** Add deep links with `dd-link finding <id>` or92 `dd-link findings-open <product id>` so a human can open the object.936. **Offer the next step, do not take it.** If findings clearly need triage, say94 so and let the user ask.9596## Brief mode9798When the user asks for a brief, standup summary, morning update, or "what99changed", follow this fixed recipe so consecutive briefs are comparable:1001011. `finding_summary` scoped to the period, using the `date` parameter, for the102 headline counts by severity.1032. New findings in the period: `get_findings` with the same `date` value and104 `status` of Active.1053. The top few by priority through `dd-api` with `o=-priority`.1064. Anything in Under Review or Risk Accepted worth a mention.107108Keep it short enough to read out loud. Lead with what changed, not with totals109that did not move.110111## Rules112113- Read-only. Never call a write endpoint from this skill, and never pass114 `--data` to `dd-api` here.115- Never invent a count, a severity, a CWE, a product name, or a finding title.116- If a tool call fails with a connection, authentication, permission, or edition117 error, stop and run the connection doctor instead of retrying blindly.118- Do not paginate endlessly. Ask for a narrower question when a result set is119 large, and say how many you fetched out of how many exist.