1---2name: audit-integrity3description: Enforce AppSec audit integrity for security analysis, code review, threat modeling, SAST, SCA, and quality scan agents. Use this skill when running a post-analysis quality gate, preventing rationalization, retrying failed evidence collection, running a second-pass self-critique, scoring output from 1-10 with a ≥8 threshold, or recording governed lessons or memories.4---56<!-- Generated from harness/github-copilot/skills/audit-integrity/SKILL.md by harness/claude-code/scripts/convert_from_copilot.py. Edit the source, not this file. -->78# Audit integrity910Apply an evidence-first quality framework to AppSec analysis so every finding, omission, retry, self-critique, and lesson is explicit, cited, and intellectually honest before delivery.1112## When to invoke1314- "Run the audit integrity gate on this security review."15- "Self-critique this SAST or SCA analysis before delivery."16- "Check that the threat model did not rationalize missing evidence."17- "Apply the AppSec quality gate with ≥8 scoring."18- "Record lessons from this false positive or methodology gap."1920## Integrity components2122| Component | Reference file | Purpose | When to apply |23| --- | --- | --- | --- |24| Clarification Protocol | `references/clarification-protocol.md` | Ask ≤2 targeted questions before analysis when scope is ambiguous. | Before analysis if scope is unclear. |25| Anti-Rationalization Guard | `references/anti-rationalization-guard.md` | Detect prohibited rationalizations and replace them with mandatory evidence-seeking responses. | During every decision point. |26| Self-Critique Loop | `references/self-critique-loop.md` | Run a mandatory second-pass review after the initial analysis. | After initial findings are drafted. |27| Retry Protocol | `references/retry-protocol.md` | Retry failed evidence collection once, then document residual gaps. | On tool failure, inaccessible files, or incomplete data. |28| Non-Negotiable Behaviors | `references/non-negotiable-behaviors.md` | Non-negotiable and non-negotiable behaviors: never fabricate, always cite evidence, report gaps, and preserve uncertainty. | Throughout the audit. |29| Self-Reflection Quality Gate | `references/self-reflection-quality-gate.md` | Score categories from 1-10 and require a ≥8 threshold per category. | Before delivery. |30| Self-Learning System | `references/self-learning-system.md` | Govern Lesson and Memory creation for novel domain-specific findings, false positives, or methodology gaps. | After delivery or when durable learning is warranted. |3132## Procedure33341. Before analysis, apply the Clarification Protocol if scope, target, or evidence source is ambiguous; ask no more than two targeted questions when interaction is possible.352. During analysis, apply the Anti-Rationalization Guard and Non-Negotiable Behaviors to every claim and evidence gap.363. After the first pass, execute the Self-Critique Loop as a second pass; customize the checklist for the agent's domain.374. On any failed tool, missing file, or unavailable evidence, apply the Retry Protocol: retry once, then document the remaining gap.385. Before delivery, run the Self-Reflection Quality Gate. All categories must score ≥8 or the agent must revise and rescore.396. After delivery, create governed Lessons/Memories and lesson/memory records only for novel findings, false positives, or methodology gaps that meet the Self-Learning System rules.4041## Agent-specific adaptation4243| Agent type | Add to Self-Critique Loop | Add to Self-Reflection Quality Gate |44| --- | --- | --- |45| SAST/SCA agents | Taint trace completeness, dependency manifest coverage, reachable sink validation. | Evidence depth, exploitability calibration, manifest coverage. |46| SonarQube-style agents | Rating sanity check and A-E consistency with findings. | Rating consistency, remediation specificity, false-positive control. |47| Threat modeling agents | STRIDE category completeness per trust boundary and data flow. | Boundary coverage, abuse-case realism, mitigation traceability. |48| Code review agents | Trust boundary audit, data flow tracing, changed-line versus reachable-code distinction. | Changed-code relevance, regression risk, citation quality. |4950## Criteria5152### Evidence honesty5354- [ ] Every finding has concrete evidence: file/line, data flow, dependency record, policy, or tool output.55- [ ] Gaps are reported as gaps, not converted into assumptions.56- [ ] Tool failures follow the retry-once protocol before being documented.5758### Output quality5960- [ ] Findings are severity-calibrated and do not exaggerate unsupported impact.61- [ ] Self-critique changed the result or explicitly confirmed no changes with reasons.62- [ ] Every self-reflection category scores ≥8 before delivery.6364## Progressive disclosure and bundled resources6566- `references/clarification-protocol.md`: ambiguity handling and ≤2-question rule.67- `references/anti-rationalization-guard.md`: anti-rationalization prohibited rationalization table and mandatory responses.68- `references/self-critique-loop.md`: second-pass review template.69- `references/retry-protocol.md`: retry once, then document failure handling.70- `references/non-negotiable-behaviors.md`: hard integrity rules.71- `references/self-reflection-quality-gate.md`: 1-10 scoring rubric with ≥8 threshold.72- `references/self-learning-system.md`: Lesson/Memory templates and governance rules.7374## Gotchas7576- **Do not let confidence replace evidence**: expert intuition can prioritize investigation, but it cannot be the evidence for a finding.77- **Do not hide inaccessible scope**: document files, services, or tools that could not be examined.78- **Do not create memories for routine facts**: use the self-learning governance rules and avoid storing sensitive information.7980## Output template8182```markdown83### Audit integrity gate8485**Status:** pass | revise required | blocked86**Scope reviewed:** `<analysis artifact or agent run>`87**Self-reflection minimum score:** `<lowest category score>/10`8889| Gate | Result | Evidence |90| --- | --- | --- |91| Clarification Protocol | pass/not needed/fail | `<scope decision>` |92| Anti-Rationalization Guard | pass/fail | `<example checked>` |93| Self-Critique Loop | pass/fail | `<changes made or reason none>` |94| Retry Protocol | pass/not needed/fail | `<retry evidence>` |95| Non-Negotiable Behaviors | pass/fail | `<citation/gap evidence>` |96| Self-Reflection Quality Gate | pass/fail | `<scores>` |97| Self-Learning System | pass/not needed/fail | `<lesson or memory decision>` |9899**Required revisions**100- `<revision before delivery, or none>`101```102103## Quality gate104105- [ ] All 7 components were applied unless a component was explicitly out of scope.106- [ ] Ambiguous scope used the Clarification Protocol before analysis.107- [ ] The Anti-Rationalization Guard was applied to unsupported assumptions.108- [ ] A second-pass Self-Critique Loop was completed.109- [ ] Tool failures were retried once and documented if still unresolved.110- [ ] Non-Negotiable Behaviors are satisfied: no fabrication, cited evidence, and reported gaps.111- [ ] Every Self-Reflection Quality Gate category scored ≥8.112- [ ] Lesson/Memory and Lessons/Memories creation followed governance and excluded sensitive information.