3 +Privately report an already confirmed security defect to authorized maintainers.
4 +External mutation must be explicit in the current context.
6 +Use available Jira and GitHub tools abstractly.
7 +Do not assume a CLI, MCP server, authentication method, or API shape.
8 +Determine the active harness route before mutating, then verify each mutation by rereading it.
12 +Resolve before publication:
14 +- confirmed regression-test verdict;
15 +- repository identity, ref, and exact commit;
16 +- security invariant and affected product surface;
17 +- source paths and symbols;
18 +- candidate and control test evidence;
19 +- assumptions and remaining limitations;
20 +- retained regression-test paths, when any.
22 +If confirmation evidence is missing or inconclusive, stop without creating external state.
23 +The user may supply equivalent evidence without running another phase.
27 +- Create no Jira or GitHub state without explicit disclosure authorization.
28 +- Report only through private destinations authorized for the affected product.
29 +- Never publish a public advisory, public issue, standalone demonstration, or demonstration-only PR.
30 +- Never include newly observed credentials, tokens, external user data, or production data.
31 +- Do not set Jira severity, priority, assignee, sprint, status, resolution, or security level.
32 +- Never add `false-positive` or dismiss a finding on a human's behalf.
33 +- Verify every external mutation by rereading the resulting object.
34 +- An optional PR contains a fix and regression test, never only evidence of the defect.
38 +Private disclosure requires:
40 +- explicit authorization in current context;
41 +- confirmed regression-test evidence with a meaningful control;
42 +- exact repository identity, ref, and commit;
43 +- grouped root cause and violated invariant;
44 +- reliable working-tree accounting;
45 +- successful Jira deduplication;
46 +- prepared ticket description and private attachment.
48 +Prepare every ticket, attachment, and optional fix plan before creating external state.
54 +1. Record the current working-tree state.
55 +2. Separate known retained regression-test changes from unrelated changes.
56 +3. Resolve the authorized private Jira project and repository destination.
57 +4. Block external mutation when unrelated or unexpected changes make the evidence unreliable.
61 +Prepare the complete private report before creating external state.
62 +Keep it fix-oriented and repository-specific:
64 +- violated invariant;
65 +- affected behavior and source;
67 +- regression-test and control results;
68 +- assumptions and limitations;
69 +- observable remediation criteria.
71 +Do not include a standalone operational procedure or generalized offensive guidance.
75 +Query every `RD` Bug labelled `ai-sec-scan`, regardless of status, resolution, Component, or presence of the `ai` label.
76 +Use summaries and available Component metadata as a lightweight index.
77 +Fetch descriptions, attachments, and comments only for semantically related candidates.
78 +Group manifestations sharing one root cause and invariant.
79 +Reuse an existing matching ticket instead of creating a duplicate.
81 +For a matching open ticket:
83 +- report `already tracked: RD-…`;
84 +- add evidence only when affected scope, regression evidence, or understanding materially changed.
86 +When an open ticket's regression test now passes, never close or resolve it.
87 +When explicitly authorized, add a concise revision-specific comment with the test, previous result, current result, and remaining uncertainty.
89 +Reopen a resolved non-false-positive ticket only when fresh regression evidence confirms the same root cause and invariant.
90 +The `false-positive` label is authoritative; only humans may add it or dismiss a ticket.
92 +###
4. Disclose privately 94 +Create or update only the authorized private ticket and required attachment.
95 +If a mutation partially succeeds, preserve the ticket, mark publication `partial`, report the exact failed operation, and stop further publication.
97 +###
5. Optional draft fix PR 99 +Create a PR only when the user separately authorized a fix and the completed change satisfies all gates:
101 +- minimal understood production change;
102 +- regression test fails on the affected base and passes with the fix;
103 +- focused and normal relevant suites pass;
104 +- no unrelated changes;
105 +- private Jira ticket already exists;
106 +- PR starts as draft.
108 +Reuse an appropriate open draft instead of creating a duplicate.
109 +Do not alter the developer's current branch; use established branch/worktree conventions.
111 +###
6. Verify and report 113 +Reread Jira and GitHub state.
114 +Report two statuses:
116 +- disclosure: `complete`, `partial`, or `failed`;
117 +- fix PR: `not requested`, `complete`, `partial`, or `failed`.
119 +Return ticket keys, private URLs, optional draft PR URL, and any retained local paths.
123 +Default company target:
126 +| ------------- | ------------------------------- |
128 +| Issue type | `Bug` |
129 +| Labels | `ai`, `ai-sec-scan`, `security` |
130 +| R&D Kategorie | `Wartung und Fehlerbehebung` |
131 +| Rolle | `Entwickler*in` |
133 +Use another destination only when the user explicitly identifies an authorized private project.
134 +Set an existing Component only when product mapping is unambiguous.
135 +Never invent a Component.
137 +##
Jira summary and description 142 +<Short codename>: <plain affected capability and boundary failure>
147 +- maximum 250 characters;
148 +- codename maximum three words;
149 +- no severity, score, file path, root-cause mechanics, or fix language;
150 +- clarity outranks humor.
152 +Description, maximum 250 words:
154 +- concise affected behavior;
155 +- violated invariant;
156 +- demonstrated human impact;
157 +- confirmed regression-test result;
158 +- assumptions and limitations;
159 +- attachment reference;
160 +- no severity, code dump, standalone operational procedure, or fix proposal.
162 +##
Private attachment 164 +Create one Markdown attachment per new or materially changed defect.
165 +Use only repository-specific engineering evidence needed for remediation.
170 +RD-1234-<codename>-regression-<short-sha>.md
176 +# <Codename>: <plain finding>
181 +- Repository: <canonical URL>
182 +- Ref: <branch or tag>
183 +- Commit: <full SHA>
184 +- Assessed: <timestamp>
186 +## Security invariant
188 +<One precise invariant.>
190 +## Affected behavior
192 +<Concise expected-versus-observed account and human impact.>
196 +- `<path>` · `<symbol>` · <role in the affected flow>
198 +## Regression evidence
200 +- Candidate test: `<path or test name>` · <expected and observed>
201 +- Control: `<path or test name>` · <expected and observed>
202 +- Focused command: `<repository-local test command>`
203 +- Surrounding suite: `<command and result>`
205 +## Assumptions and limitations
207 +<Only facts affecting validity or deployment relevance.>
209 +## Remediation acceptance
211 +<Observable behavior and test results required after a fix.>
213 +## Artifacts and working tree
215 +- Initial state: <state>
216 +- Retained regression work: <exact paths or none>
217 +- Final state: <state>
220 +Do not include real targets, credentials, production data, generalized procedures, or unrelated repository details.
221 +Delete the temporary attachment after verified upload.
222 +If upload fails, retain and report its exact path until repaired, then delete it.
224 +##
Jira mutation failure 226 +If ticket creation succeeds but later work fails:
228 +1. never delete the ticket;
229 +2. mark it incomplete when possible without changing forbidden fields;
230 +3. report the exact key and failed operation;
231 +4. set disclosure status to `partial`;
232 +5. stop further publication until repaired.
236 +A PR requires separate explicit fix authorization.
237 +Use at most one PR per Jira ticket and reuse an appropriate open draft.
238 +Every PR starts as draft.
240 +Create the Jira ticket first because its key is required in branch and PR names.
241 +Follow repository branch and worktree conventions.
242 +When none exist, use:
245 +security/RD-1234-<codename>
248 +Never alter a developer's current branch merely to publish.
249 +A tag may be disclosed to Jira but never used to create a fix PR or silently revalidated on trunk.
253 +| Label | Color | Description |
254 +| ------------- | --------- | -------------------------------------------------- |
255 +| `ai` | `#8250DF` | Created or materially authored by an agent |
256 +| `ai-sec-scan` | `#0969DA` | Produced by the defensive security review workflow |
257 +| `security` | `#CF222E` | Security-relevant finding or change |
259 +Create a missing label with that definition.
260 +Never modify an existing label.
265 +RD-1234 <Codename>: fix <plain affected behavior>
271 +## RD-1234 · <Codename>: <plain finding>
275 +<Concise fix behavior.>
279 +- Before: <test and observed failure>
280 +- After: <test and observed success>
285 +- `<focused command>`
286 +- `<normal relevant suite>`
289 +The regression test must fail on the affected base and pass with the fix.
290 +The normal relevant suite must pass.
291 +No demonstration-only PR is allowed.
293 +##
Final verification 295 +Before reporting success, reread and verify:
299 +- correct private project and issue type;
300 +- summary and description;
301 +- mandatory labels and fields;
302 +- private attachment present;
303 +- no forbidden field mutation;
304 +- existing-ticket action matched deduplication.
306 +###
GitHub, when a fix PR exists 309 +- Jira key in title;
310 +- correct source and target branches;
311 +- required labels present;
312 +- regression and normal suites pass;
313 +- no unrelated changes;
314 +- developer branch/worktree preserved.