ronce-racine 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/AGENTS.md +90 -0
  2. package/LICENSE +21 -0
  3. package/README.md +281 -0
  4. package/agents/code-reviewer.md +33 -0
  5. package/agents/qa-tester.md +28 -0
  6. package/dist/hooks/README.md +182 -0
  7. package/dist/hooks/bash-npm-silent.mjs +81 -0
  8. package/dist/hooks/session-inject.mjs +53 -0
  9. package/dist/hooks/session-precompact.mjs +36 -0
  10. package/dist/hooks/session-writer.mjs +142 -0
  11. package/dist/hooks/skill-reminder.mjs +89 -0
  12. package/dist/hooks/truncate-bash-output.mjs +46 -0
  13. package/dist/hooks/truncate-output.mjs +88 -0
  14. package/dist/hooks/worktree-env-setup.mjs +123 -0
  15. package/dist/install.js +962 -0
  16. package/docs/adopting-a-repo.md +80 -0
  17. package/docs/architecture.md +76 -0
  18. package/docs/decisions.md +72 -0
  19. package/docs/developing.md +143 -0
  20. package/docs/evaluating-skills.md +41 -0
  21. package/docs/git-worktrees.md +62 -0
  22. package/docs/rules/clean-architecture-deps.md +66 -0
  23. package/docs/rules/commits.md +59 -0
  24. package/docs/rules/detection-gap-protocol.md +55 -0
  25. package/docs/rules/error-handling-discipline.md +62 -0
  26. package/docs/rules/minimal-code.md +58 -0
  27. package/docs/rules/no-raw-sql-interpolation.md +57 -0
  28. package/docs/rules/pre-commit-secret-detection.md +54 -0
  29. package/docs/rules/secure-logging.md +53 -0
  30. package/docs/rules/sql-migrations-discipline.md +58 -0
  31. package/docs/rules/subscription-cleanup.md +63 -0
  32. package/docs/rules/test-discipline.md +66 -0
  33. package/docs/rules/ui-states-complete.md +52 -0
  34. package/docs/templates/SKILL.template.md +66 -0
  35. package/docs/templates/rule.template.md +16 -0
  36. package/docs/writing-a-rule.md +43 -0
  37. package/docs/writing-a-skill.md +118 -0
  38. package/package.json +45 -0
  39. package/rules/clean-architecture-deps.md +20 -0
  40. package/rules/commits.md +16 -0
  41. package/rules/detection-gap-protocol.md +35 -0
  42. package/rules/error-handling-discipline.md +23 -0
  43. package/rules/minimal-code.md +32 -0
  44. package/rules/no-raw-sql-interpolation.md +20 -0
  45. package/rules/pre-commit-secret-detection.md +14 -0
  46. package/rules/secure-logging.md +16 -0
  47. package/rules/sql-migrations-discipline.md +18 -0
  48. package/rules/subscription-cleanup.md +22 -0
  49. package/rules/test-discipline.md +20 -0
  50. package/rules/ui-states-complete.md +23 -0
  51. package/scripts/subscription-leak-scan.ts +53 -0
  52. package/skills/adversarial-feature-challenge/README.md +65 -0
  53. package/skills/adversarial-feature-challenge/SKILL.md +96 -0
  54. package/skills/adversarial-feature-challenge/assets/fuzz-payloads.txt +60 -0
  55. package/skills/adversarial-feature-challenge/templates/challenge-report.md +42 -0
  56. package/skills/api-contract-versioning/README.md +62 -0
  57. package/skills/api-contract-versioning/SKILL.md +76 -0
  58. package/skills/api-contract-versioning/templates/consumer-inventory.md +29 -0
  59. package/skills/audit-architecture/README.md +56 -0
  60. package/skills/audit-architecture/SKILL.md +97 -0
  61. package/skills/audit-architecture/reference/ar-architecture.md +275 -0
  62. package/skills/audit-architecture/reference/di-disponibilite.md +252 -0
  63. package/skills/audit-architecture/reference/im-incidents.md +217 -0
  64. package/skills/audit-architecture/reference/pa-pannes.md +362 -0
  65. package/skills/audit-architecture/reference/re-recuperation.md +300 -0
  66. package/skills/audit-architecture/reference/sc-scalabilite.md +173 -0
  67. package/skills/audit-architecture/reference/su-support.md +180 -0
  68. package/skills/audit-ci-cd/README.md +54 -0
  69. package/skills/audit-ci-cd/SKILL.md +124 -0
  70. package/skills/audit-ci-cd/reference/artefacts.md +39 -0
  71. package/skills/audit-ci-cd/reference/deploiement.md +100 -0
  72. package/skills/audit-ci-cd/reference/dora.md +94 -0
  73. package/skills/audit-ci-cd/reference/iac.md +40 -0
  74. package/skills/audit-ci-cd/reference/pipeline-ci.md +36 -0
  75. package/skills/audit-ci-cd/reference/supply-chain.md +44 -0
  76. package/skills/audit-compliance/README.md +69 -0
  77. package/skills/audit-compliance/SKILL.md +176 -0
  78. package/skills/audit-compliance/reference/conformite-rgpd.md +295 -0
  79. package/skills/audit-compliance/reference/finops.md +318 -0
  80. package/skills/audit-compliance/reference/gouvernance-donnees.md +238 -0
  81. package/skills/audit-industrialisation/README.md +53 -0
  82. package/skills/audit-industrialisation/SKILL.md +251 -0
  83. package/skills/audit-observability/README.md +64 -0
  84. package/skills/audit-observability/SKILL.md +134 -0
  85. package/skills/audit-observability/reference/alerting.md +214 -0
  86. package/skills/audit-observability/reference/logging.md +114 -0
  87. package/skills/audit-observability/reference/metriques.md +166 -0
  88. package/skills/audit-observability/reference/traces-dashboards.md +90 -0
  89. package/skills/audit-performance-frontend/README.md +91 -0
  90. package/skills/audit-performance-frontend/SKILL.md +194 -0
  91. package/skills/audit-performance-frontend/reference/assets-cache-network.md +129 -0
  92. package/skills/audit-performance-frontend/reference/css-rendering-pipeline.md +154 -0
  93. package/skills/audit-performance-frontend/reference/html-critical-path.md +128 -0
  94. package/skills/audit-performance-frontend/reference/js-engine-runtime.md +280 -0
  95. package/skills/audit-performance-frontend/reference/memory-gc.md +126 -0
  96. package/skills/audit-performance-frontend/reference/profiling-tooling.md +98 -0
  97. package/skills/audit-quality/README.md +85 -0
  98. package/skills/audit-quality/SKILL.md +126 -0
  99. package/skills/audit-quality/reference/qa-devops.md +539 -0
  100. package/skills/audit-quality/reference/qu-qualite-donnees.md +402 -0
  101. package/skills/audit-report/README.md +72 -0
  102. package/skills/audit-report/SKILL.md +241 -0
  103. package/skills/audit-report/reference/scoring-model.md +45 -0
  104. package/skills/audit-security/README.md +72 -0
  105. package/skills/audit-security/SKILL.md +140 -0
  106. package/skills/audit-security/reference/auth-identite.md +98 -0
  107. package/skills/audit-security/reference/autorisation.md +66 -0
  108. package/skills/audit-security/reference/chiffrement-tls.md +97 -0
  109. package/skills/audit-security/reference/detection-patching.md +67 -0
  110. package/skills/audit-security/reference/incident-response.md +98 -0
  111. package/skills/audit-security/reference/reseau-conteneurs.md +72 -0
  112. package/skills/audit-security/reference/secrets.md +36 -0
  113. package/skills/audit-testing/README.md +82 -0
  114. package/skills/audit-testing/SKILL.md +131 -0
  115. package/skills/audit-testing/reference/golden-dataset.md +65 -0
  116. package/skills/audit-testing/reference/resilience-chaos.md +93 -0
  117. package/skills/audit-testing/reference/tests-contractuels.md +65 -0
  118. package/skills/audit-testing/reference/tests-e2e-flaky.md +67 -0
  119. package/skills/audit-testing/reference/tests-unit-integ-ci.md +125 -0
  120. package/skills/bug-ticket-root-cause/README.md +67 -0
  121. package/skills/bug-ticket-root-cause/SKILL.md +86 -0
  122. package/skills/bug-ticket-root-cause/templates/bug-ticket.md +43 -0
  123. package/skills/bug-triage-structured/README.md +63 -0
  124. package/skills/bug-triage-structured/SKILL.md +104 -0
  125. package/skills/bug-triage-structured/templates/bug-triage.md +38 -0
  126. package/skills/ci-pipeline-orchestration/README.md +55 -0
  127. package/skills/ci-pipeline-orchestration/SKILL.md +110 -0
  128. package/skills/commit-readiness-review/README.md +66 -0
  129. package/skills/commit-readiness-review/SKILL.md +82 -0
  130. package/skills/commit-readiness-review/scripts/precommit-scan.ts +81 -0
  131. package/skills/comprehensive-test-strategy/README.md +64 -0
  132. package/skills/comprehensive-test-strategy/SKILL.md +108 -0
  133. package/skills/comprehensive-test-strategy/reference/testing-advanced.md +85 -0
  134. package/skills/daily-workflow-optimization/README.md +56 -0
  135. package/skills/daily-workflow-optimization/SKILL.md +80 -0
  136. package/skills/database-schema-evolution/README.md +54 -0
  137. package/skills/database-schema-evolution/SKILL.md +107 -0
  138. package/skills/ddd-backend-implementation/README.md +63 -0
  139. package/skills/ddd-backend-implementation/SKILL.md +95 -0
  140. package/skills/design-system-component-lifecycle/README.md +56 -0
  141. package/skills/design-system-component-lifecycle/SKILL.md +97 -0
  142. package/skills/design-system-component-lifecycle/templates/component-contract.md +43 -0
  143. package/skills/detection-sweep/README.md +58 -0
  144. package/skills/detection-sweep/SKILL.md +93 -0
  145. package/skills/detection-sweep/scripts/sweep.ts +80 -0
  146. package/skills/domain-modeling-design/README.md +57 -0
  147. package/skills/domain-modeling-design/SKILL.md +83 -0
  148. package/skills/frontend-fullstack-implementation/README.md +60 -0
  149. package/skills/frontend-fullstack-implementation/SKILL.md +133 -0
  150. package/skills/frontend-spec-call-site-audit/README.md +66 -0
  151. package/skills/frontend-spec-call-site-audit/SKILL.md +82 -0
  152. package/skills/frontend-spec-call-site-audit/scripts/audit-entry-points.ts +79 -0
  153. package/skills/frontend-spec-call-site-audit/templates/ticket-frontend.md +32 -0
  154. package/skills/merge-request-review/README.md +60 -0
  155. package/skills/merge-request-review/SKILL.md +77 -0
  156. package/skills/merge-request-review/templates/mr-review-report.md +29 -0
  157. package/skills/production-incident-diagnostic/README.md +63 -0
  158. package/skills/production-incident-diagnostic/SKILL.md +103 -0
  159. package/skills/production-incident-diagnostic/templates/incident-report.md +33 -0
  160. package/skills/qa-session-intake/README.md +56 -0
  161. package/skills/qa-session-intake/SKILL.md +78 -0
  162. package/skills/recording-decisions/README.md +91 -0
  163. package/skills/recording-decisions/SKILL.md +84 -0
  164. package/skills/recurring-bug-root-cause/README.md +64 -0
  165. package/skills/recurring-bug-root-cause/SKILL.md +93 -0
  166. package/skills/recurring-bug-root-cause/scripts/detect-recurring-fixes.ts +46 -0
  167. package/skills/recurring-bug-root-cause/templates/postmortem-recidive.md +37 -0
  168. package/skills/refactoring-shared-component-api/README.md +50 -0
  169. package/skills/refactoring-shared-component-api/SKILL.md +84 -0
  170. package/skills/refactoring-shared-component-api/scripts/sweep-call-sites.ts +85 -0
  171. package/skills/refactoring-shared-component-api/templates/migration-checklist.md +19 -0
  172. package/skills/validating-features-end-to-end/README.md +50 -0
  173. package/skills/validating-features-end-to-end/SKILL.md +90 -0
  174. package/skills/visual-regression-check/README.md +51 -0
  175. package/skills/visual-regression-check/SKILL.md +89 -0
  176. package/skills/writing-robust-tests/README.md +53 -0
  177. package/skills/writing-robust-tests/SKILL.md +88 -0
  178. package/templates/.adopted.example +8 -0
  179. package/templates/anti-drift.gitlab-ci.yml +23 -0
@@ -0,0 +1,241 @@
1
+ ---
2
+ name: audit-report
3
+ description: Use when consolidating audit results into a report or reformatting existing audit findings - template and scoring rules for the consolidated audit report. Standalone or as reference for the orchestrator. Triggers on "audit report", "rapport audit", "consolider audit", "consolidate audit", "reformat audit findings".
4
+ version: 1.0.1
5
+ metadata:
6
+ last-reviewed: 2026-07-20
7
+ category: audit
8
+ ---
9
+
10
+ ## This skill vs. audit-industrialisation
11
+
12
+ - **This skill** when: reformatting/consolidating **already-produced** audit results into a structured report (scoring + template), or as a scoring reference
13
+ - **audit-industrialisation** instead if: the audit must be **produced** end to end (profiling, running the domains, then consolidating) - it uses this skill in Phase 3
14
+ - **an `audit-<domain>`**: to evaluate a single domain, not for the global report
15
+
16
+ ---
17
+
18
+ # Audit Report - template and computation rules
19
+
20
+ ## Role
21
+
22
+ This skill acts as a **reference document** for generating consolidated audit reports. It can be invoked two ways:
23
+ - **Standalone** (`/audit-report`): reformat existing audit results into a structured report
24
+ - **Reference**: used by the orchestrator (`audit-industrialisation`) to apply the scoring rules and the template
25
+
26
+ The orchestration procedure (order in which domain audits run, collection, consolidation) is handled by `audit-industrialisation`.
27
+
28
+ ## Prerequisites
29
+
30
+ This skill expects the results of one or more domain audits (counts aligned with the audit skills - source: the "Coverage per skill" table in `audit-industrialisation`):
31
+ - `audit-ci-cd`: CI/CD & Release Management (section-ci, 10 questions)
32
+ - `audit-testing`: Testing & Validation (section-te, 13 questions)
33
+ - `audit-security`: Security (section-se, 16 questions)
34
+ - `audit-observability`: Observability & Alerting (section-ob + section-al, 15 questions)
35
+ - `audit-architecture`: Architecture, Scalability & Availability (sections ar/sc/pa/re/di/su/im, 74 questions)
36
+ - `audit-quality`: QA & DevOps + Data Quality (section-qa + section-qu, 28 questions)
37
+ - `audit-compliance`: Compliance, Governance & FinOps (sections co/dg/fi, 29 questions)
38
+ - `audit-performance-frontend`: Frontend Performance (section-pf, 29 questions)
39
+
40
+ **Total: 214 questions across 18 sections, 8 domains.**
41
+
42
+ ## Score computation
43
+
44
+ The domain weights, the domain/global score formula and the maturity classification are the
45
+ **single source of truth** in [`reference/scoring-model.md`](reference/scoring-model.md).
46
+ Read that file to apply the exact weights and thresholds. Summary:
47
+
48
+ - **Domain score** = arithmetic mean of the scored questions (**N/A excluded** from the denominator).
49
+ - **Global score** = weighted average of the domain scores; non-audited domains excluded.
50
+ - The weight table and the maturity thresholds live ONLY in `reference/scoring-model.md` - never restate the numbers elsewhere.
51
+
52
+ ## Processing rules
53
+
54
+ ### N/A handling
55
+ - Questions marked N/A are **excluded** from the averages (domain and global).
56
+ - List the N/A questions in the "Non-auditable items" section with the reason.
57
+
58
+ ### Low-confidence warning
59
+ - If **>50% of a domain's questions** have "low" confidence, add a visible warning in the report for that domain:
60
+ `-- WARNING: majority of evaluations at low confidence. This domain's scores are unreliable. --`
61
+ - If >50% of the **global** questions are at low confidence, add a warning in the executive summary.
62
+
63
+ ### Priority critical items (MUST at level 0)
64
+ - Any **MUST** criticality question evaluated at **level 0** must appear **first** in the recommendations, tagged `[CRITICAL]`.
65
+ - These items are listed before the quick wins in the action plan.
66
+
67
+ ### Cross-domain consistency
68
+ - If the **same file** (or component) is cited in several domains with contradictory evaluations (e.g. a file judged "well structured" in quality but "insecure" in security), **flag the inconsistency** in a dedicated report section.
69
+ - This helps the reader understand the nuances between domains.
70
+
71
+ ## Prioritization rules
72
+
73
+ | Criterion | MUST priority |
74
+ |---------|--------------|
75
+ | Security score 0-1 | Always MUST |
76
+ | Hard-coded secrets in the code | Immediate MUST |
77
+ | No tests in CI | MUST |
78
+ | No tested backup | MUST |
79
+ | No production monitoring | MUST |
80
+ | GDPR compliance score 0-1 | MUST (legal obligation) |
81
+
82
+ | Criterion | SHOULD priority |
83
+ |---------|----------------|
84
+ | Coverage < 50% | SHOULD |
85
+ | No ADR | SHOULD |
86
+ | No input validation | SHOULD |
87
+ | CI pipeline > 15 min | SHOULD |
88
+
89
+ | Criterion | COULD priority |
90
+ |---------|---------------|
91
+ | No chaos testing | COULD |
92
+ | No DORA metrics | COULD |
93
+ | No data catalog | COULD |
94
+ | No FinOps | COULD |
95
+
96
+ ## Report template
97
+
98
+ ```markdown
99
+ # Software industrialization audit report
100
+
101
+ **Project:** [project name]
102
+ **Date:** [date]
103
+ **Scope:** [audited domains]
104
+
105
+ ---
106
+
107
+ ## Executive summary
108
+
109
+ [3-5 sentences summarizing the project's overall state, major strengths and main risks]
110
+ [If >50% of the global questions are at low confidence, add: "WARNING: the majority of evaluations rest on low confidence. This report must be completed by an in-depth analysis."]
111
+
112
+ **Global score: X.X/4 -- [Level]**
113
+
114
+ ---
115
+
116
+ ## Maturity radar
117
+
118
+ ```
119
+ CI/CD (X.X)
120
+ *
121
+ * *
122
+ Compliance (X.X) * * Testing (X.X)
123
+ * + *
124
+ Quality (X.X) * * Security (X.X)
125
+ * *
126
+ *
127
+ Archi (X.X) Observ. (X.X)
128
+ ```
129
+
130
+ [Textual radar with the per-domain scores -- adapted to the audited domains]
131
+
132
+ ---
133
+
134
+ ## Scores per domain
135
+
136
+ | Domain | Score | Level | N/A questions |
137
+ |---------|-------|--------|---------------|
138
+ | CI/CD & Release | X.X/4 | [level] | X |
139
+ | Testing & Validation | X.X/4 | [level] | X |
140
+ | Security | X.X/4 | [level] | X |
141
+ | Observability & Alerting | X.X/4 | [level] | X |
142
+ | Architecture & Availability | X.X/4 | [level] | X |
143
+ | Code & Data Quality | X.X/4 | [level] | X |
144
+ | Compliance & Governance | X.X/4 | [level] | X |
145
+
146
+ ---
147
+
148
+ ## Detail per domain
149
+
150
+ ### [Domain] -- X.X/4
151
+
152
+ [Domain summary]
153
+ [If >50% low confidence: "WARNING: majority of evaluations at low confidence."]
154
+
155
+ | Code | Question | Criticality | Level | Confidence | Justification |
156
+ |------|----------|-----------|--------|-----------|---------------|
157
+ | XX-01 | ... | MUST/SHOULD/COULD | X | high/medium/low | ... |
158
+ | XX-02 | ... | MUST/SHOULD/COULD | X or N/A | high/medium/low | ... |
159
+
160
+ **Strengths:** ...
161
+ **Weaknesses:** ...
162
+
163
+ [Repeat for each domain]
164
+
165
+ ---
166
+
167
+ ## Cross-domain inconsistencies
168
+
169
+ [If files/components are cited in several domains with contradictory evaluations, list them here]
170
+ | File/Component | Domain A | Evaluation A | Domain B | Evaluation B | Comment |
171
+ |-------------------|-----------|-------------|-----------|-------------|-------------|
172
+ | ... | ... | ... | ... | ... | ... |
173
+
174
+ [If no inconsistency: "No inconsistency detected."]
175
+
176
+ ---
177
+
178
+ ## Action plan
179
+
180
+ ### Critical (MUST at level 0)
181
+ 1. [CRITICAL] ...
182
+
183
+ ### Quick wins (low effort, high impact)
184
+ 2. [MUST] ...
185
+ 3. [MUST] ...
186
+
187
+ ### Short-term work (1-3 months)
188
+ 4. [MUST] ...
189
+ 5. [SHOULD] ...
190
+
191
+ ### Medium-term work (3-6 months)
192
+ 6. [SHOULD] ...
193
+ 7. [COULD] ...
194
+
195
+ ### Long-term vision (6-12 months)
196
+ 8. [COULD] ...
197
+
198
+ ---
199
+
200
+ ## Non-auditable items
201
+
202
+ - [List the N/A questions and the non-verifiable aspects]
203
+ - [Reason: no infra access, no documentation, static hosting, etc.]
204
+ - [Impact on the overall reliability of the audit]
205
+
206
+ ---
207
+
208
+ ## Appendices
209
+
210
+ ### Validation methods used
211
+ - **code_analysis**: reading the source code and configurations
212
+ - **document_review**: checking the existing documentation
213
+ - **technical_test**: running analysis commands (npm audit, etc.)
214
+ - **observation**: observing the project's structure and patterns
215
+
216
+ ### Reference model
217
+ Based on the adapted CMMI maturity model (levels 0-4). The questions are defined in the audit skills (source of the questions).
218
+
219
+ ### Confidence levels
220
+ - **high**: direct verification through the code or commands
221
+ - **medium**: deduction from partial clues
222
+ - **low**: assumption based on the absence of evidence or insufficient context
223
+ ```
224
+
225
+ ## Structured export (optional, project-specific)
226
+
227
+ The generic deliverable is the **Markdown report**. A project that manages its audits in a dedicated tool (knowledge base, audit app) may additionally produce a structured export (YAML/JSON) with aligned lowercase IDs (`ci-01`, `te-09a`…) - but that format depends on the target tool and belongs to the **project skill**, not to this generic skill.
228
+
229
+ ## Exit condition
230
+
231
+ - [ ] Domain score = average of the scored questions (N/A excluded), weighted global score (weight table applied)
232
+ - [ ] Maturity classification assigned per the grid
233
+ - [ ] Each answer backed by evidence (no opinion without evidence)
234
+ - [ ] Recommendations prioritized MUST/SHOULD/COULD + impact projection `(XX-01: current→projected)`
235
+ - [ ] Markdown report produced (structured export only if the project requires it)
236
+
237
+ ## Changelog
238
+
239
+ - 1.0.1 (2026-07-20) - weight table and thresholds no longer restated outside reference/scoring-model.md
240
+
241
+ - 1.0.0 (2026-06-19) - initial versioned release + state-of-the-art enrichment (routing, context, protocol, traps, exit condition)
@@ -0,0 +1,45 @@
1
+ # Scoring model - single source of truth
2
+
3
+ This file is the **canonical** definition of the domain-weight table and the maturity
4
+ classification used by the consolidated audit report. It is owned by the `audit-report`
5
+ skill and referenced (never copied) by `audit-industrialisation` (Phase 3).
6
+
7
+ > Any change to the weights or thresholds happens **here only**. No other file duplicates it.
8
+
9
+ ## Domain weights (global score)
10
+
11
+ The global score is the weighted average of the domain scores. Non-audited (fully-N/A)
12
+ domains are excluded from the computation (their weight is ignored).
13
+
14
+ **Formula**: `global_score = Σ(domain_score × weight) / Σ(weights of the scored domains)`
15
+
16
+ | Domain | Weight | Rationale |
17
+ |---------|-------|---------------|
18
+ | Security | 1.5 | Critical impact (data, compliance, reputation) |
19
+ | Testing | 1.2 | Foundation of quality, regression prevention |
20
+ | CI/CD | 1.0 | Enabler of every practice |
21
+ | Observability | 1.0 | Essential to detect production problems |
22
+ | Architecture | 1.0 | Long-term structure, maintainability |
23
+ | Quality | 1.0 | Day-to-day maintainability |
24
+ | Compliance | 1.0 | Legal obligations and governance |
25
+ | Frontend Perf | 0.8 | Optional, applicable only if there is significant frontend |
26
+
27
+ ## Domain score
28
+
29
+ Arithmetic mean of each question's level in the domain. **N/A questions are excluded**
30
+ from the denominator.
31
+
32
+ Example: a domain with 8 questions, 2 of them N/A, scores [2, 3, N/A, 1, 2, 2, N/A, 3]
33
+ → score = (2+3+1+2+2+3) / 6 = 2.17/4.
34
+
35
+ ## Global maturity classification
36
+
37
+ Based on the adapted CMMI maturity model (levels 0-4).
38
+
39
+ | Score | Level | Description |
40
+ |-------|--------|-------------|
41
+ | 0.0 - 0.9 | Initial | Ad hoc practices, no established process |
42
+ | 1.0 - 1.9 | Managed | Basic processes in place, reactive |
43
+ | 2.0 - 2.9 | Defined | Standardized and documented processes |
44
+ | 3.0 - 3.5 | Controlled | Measured and controlled processes |
45
+ | 3.6 - 4.0 | Optimized | Continuous improvement, state of the art |
@@ -0,0 +1,72 @@
1
+ # `audit-security`
2
+
3
+ > Score a project's application-security maturity across 16 questions in 7 sections, each rated 0-4 with justification and confidence.
4
+
5
+ | | |
6
+ |---|---|
7
+ | **Type** | Skill (on-demand workflow) |
8
+ | **Category** | `audit` |
9
+ | **Artifact** | [`SKILL.md`](SKILL.md) |
10
+ | **Tooling** | None (analysis-driven; bash checks per question in `reference/`) |
11
+
12
+ ## What it is
13
+
14
+ `audit-security` is a structured maturity assessment for the security posture of a codebase. It walks 16 questions grouped into 7 sections - encryption & TLS, secrets, authentication & identity, authorization & audit log, incident response, detection & patching, network & containers - and assigns each one a level from 0 (absent) to 4 (state of the art), with a justification and a confidence rating. The result is a domain score and a report of strengths, weaknesses, and prioritized recommendations.
15
+
16
+ The detailed grids live under [`reference/`](reference/) as a progressive-disclosure layer: `SKILL.md` carries the protocol, scoring rules, and output format, while each reference file holds the statement, the items to check, the bash commands, and the 0-4 level table for its questions.
17
+
18
+ ## Why it exists
19
+
20
+ Security reviews tend to be either a vague gut-check ("looks fine") or an unbounded pentest. This skill sits in between: a **repeatable, evidence-driven grid** that any agent can run against a repo to produce a comparable score. Because every question comes with concrete verification commands and explicit level criteria, two runs on the same codebase converge, and a run three months later shows real movement rather than mood.
21
+
22
+ It is deliberately scoped to what static analysis of a repository can see. Anything that cannot be verified that way - runtime config, an external WAF, pentest results - is reported under **non-auditable items** rather than silently scored.
23
+
24
+ ## When it triggers
25
+
26
+ Invoke it for a **targeted security audit** of a single project. Trigger phrases include:
27
+
28
+ - "audit sécurité" / "audit security"
29
+ - "audit auth"
30
+ - "audit secrets"
31
+
32
+ For a **full multi-domain maturity audit**, use [`audit-industrialisation`](../audit-industrialisation/) instead - it orchestrates all the domain audits (this one included) and produces a consolidated report. Do not invoke each domain skill separately when a global audit is wanted.
33
+
34
+ ## How it works
35
+
36
+ The stages below sketch the approach; the full step-by-step protocol → [`SKILL.md`](SKILL.md).
37
+
38
+ ### 1. Identify the project type
39
+
40
+ Backend, SPA frontend, fullstack, library, or microservices. The project type marks certain questions **N/A** - a frontend SPA without a backend has no DB encryption or server-side authorization to score; a library has no containers unless it ships a Docker image. The [Variants by project type](SKILL.md#variants-by-project-type) section spells out the N/A sets.
41
+
42
+ ### 2. Run the audit protocol
43
+
44
+ Scan for secrets, check `.gitignore`, read server configs, analyze auth (JWT, refresh, revocation, IdP/SSO/MFA), verify roles (RBAC/ABAC, least privilege), review audit logs, incident response, the CI pipeline (SAST/SCA, Dependabot, container scanning), network security, and container security. Run `npm audit` (or the language equivalent) for a vulnerability snapshot, then execute the per-question verification commands from the reference grids.
45
+
46
+ ### 3. Score each question
47
+
48
+ - Assign a level 0-4 with a justification and a confidence (high/medium/low).
49
+ - Sub-questions (SE-02a, SE-04a, SE-07a) are full questions in the average. Some have a dependency gate - e.g. SE-02a is only evaluated if SE-02 >= level 2.
50
+ - **Domain score = average of scored questions, excluding N/A**, reported as "X scored out of Y".
51
+
52
+ ### 4. Produce the report
53
+
54
+ Use the [output format](SKILL.md#output-format): summary, the per-question table, strengths, weaknesses, prioritized recommendations ([MUST]/[SHOULD]/[COULD]), and the non-auditable items.
55
+
56
+ ## Worked example
57
+
58
+ > You audit `acme-app`, a fullstack Node.js service, on request "fais un audit sécurité".
59
+
60
+ 1. **Project type**: fullstack - no questions marked N/A.
61
+ 2. **Secrets scan + configs**: `grep -r` finds no hardcoded secrets, `.env` is gitignored, Traefik terminates TLS 1.3 with HSTS. → SE-01 scored **3**.
62
+ 3. **Auth**: JWTs are RS256 with a 1h lifetime and refresh tokens, but no revocation path exists (SE-04a). → SE-04 **2**, SE-04a **1** (dependency gate satisfied since SE-04 >= 2).
63
+ 4. **Patching**: Dependabot is configured but there is no severity SLA. `npm audit` reports two moderate advisories. → SE-09 **2**.
64
+ 5. **Incident response**: no documented IRP found. → SE-07 **0**, and SE-07a is left **N/A** (dependency gate: SE-07 < level 2).
65
+ 6. **Report**: domain score computed over the scored questions, with the top recommendation "[MUST] add a token revocation mechanism (SE-04a)" and the SIEM finding listed under non-auditable items because detection is handled by an external platform.
66
+
67
+ ## Related artifacts
68
+
69
+ - [`audit-industrialisation`](../audit-industrialisation/) - orchestrates the full multi-domain audit and consolidates the report.
70
+ - [`audit-report`](../audit-report/) - the template and scoring rules for the consolidated report.
71
+ - [`audit-ci-cd`](../audit-ci-cd/) - sibling domain audit for pipelines, deployment, and supply-chain security.
72
+ - [`audit-observability`](../audit-observability/) - sibling domain audit for logging, metrics, tracing, and alerting.
@@ -0,0 +1,140 @@
1
+ ---
2
+ name: audit-security
3
+ description: Application security audit. Use when auditing TLS, encryption, authentication, authorization, secrets management, incident response, SIEM, network security, or container security. Triggers on "audit sécurité", "audit security", "audit auth", "audit secrets".
4
+ version: 1.0.0
5
+ metadata:
6
+ last-reviewed: 2026-06-19
7
+ category: audit
8
+ ---
9
+
10
+ # Security Audit
11
+
12
+ ## When ME and not audit-industrialisation
13
+
14
+ - **ME** when: audit focused on this domain only
15
+ - **audit-industrialisation** instead if: global multi-domain audit - it orchestrates all the audits (including ME) and produces a consolidated report
16
+
17
+ > For a full project audit, use `audit-industrialisation` rather than invoking each skill separately.
18
+
19
+ ## Overview
20
+
21
+ Audit the security maturity of a project: encryption in transit and at rest, key management, secrets rotation, JWT authentication, token revocation, roles and permissions, audit log, incident response plan, crisis communication, SIEM detection, patching, post-mortem, federated authentication, network security, container security. Produces a maturity score (0-4) per question.
22
+
23
+ **16 questions** split across 7 sections. The detailed grids (statement, checks, commands, levels 0-4) are in `reference/` - see [Grids by section](#grids-by-section).
24
+
25
+ ## Score calculation
26
+
27
+ - Domain score = average of the scored questions (exclude N/A)
28
+ - State "X questions scored out of Y total"
29
+ - A question is N/A if the project profile makes it non-applicable (see [Variants by project type](#variants-by-project-type))
30
+ - Sub-questions (SE-02a, SE-04a, SE-07a) count as full questions in the calculation
31
+
32
+ ## Audit protocol
33
+
34
+ 1. **Identify the project type**: backend, SPA frontend, fullstack, library, microservices. Mark questions N/A according to the variants below.
35
+ 2. **Scan for secrets**: `grep -r` for secret patterns in the source code
36
+ 3. **Check .gitignore**: `.env`, credentials, keys
37
+ 4. **Read server configs**: Nginx, Caddy, Traefik, middleware headers
38
+ 5. **Analyze auth**: JWT config, refresh tokens, revocation, IdP, SSO, MFA
39
+ 6. **Check roles**: RBAC/ABAC, least privilege, separation of duties
40
+ 7. **Review audit logs**: structure, immutability, retention
41
+ 8. **Check incident response**: IRP, playbooks, crisis communication
42
+ 9. **Check the pipeline**: SAST/SCA stages, Dependabot, container scanning
43
+ 10. **Review network security**: WAF, segmentation, DDoS protection
44
+ 11. **Review container security**: images, scanning, runtime protection
45
+ 12. **Run `npm audit`** (if Node.js) or equivalent for a vulnerability snapshot
46
+ 13. **Run the verification commands** listed for each question
47
+ 14. **Assign a level** per question with justification and confidence level
48
+ 15. **Produce the report** using the output format below
49
+
50
+ ## Grids by section
51
+
52
+ Each file contains the statement, the items to analyze/check, the bash commands and the level 0-4 tables.
53
+
54
+ | Section | Reference | Questions | Count |
55
+ |-------|-----------|-----------|-----|
56
+ | Encryption & TLS | [reference/chiffrement-tls.md](reference/chiffrement-tls.md) | SE-01, SE-02, SE-02a | 3 |
57
+ | Secrets | [reference/secrets.md](reference/secrets.md) | SE-03 | 1 |
58
+ | Authentication & Identity | [reference/auth-identite.md](reference/auth-identite.md) | SE-04, SE-04a, SE-11 | 3 |
59
+ | Authorization & Audit log | [reference/autorisation.md](reference/autorisation.md) | SE-05, SE-06 | 2 |
60
+ | Incident response | [reference/incident-response.md](reference/incident-response.md) | SE-07, SE-07a, SE-10 | 3 |
61
+ | Detection & Patching | [reference/detection-patching.md](reference/detection-patching.md) | SE-08, SE-09 | 2 |
62
+ | Network & Containers | [reference/reseau-conteneurs.md](reference/reseau-conteneurs.md) | SE-12, SE-13 | 2 |
63
+
64
+ ## Variants by project type
65
+
66
+ ### Frontend SPA/PWA without a backend
67
+ - **SE-02, SE-02a** (DB encryption / Key management) → **N/A**: no server-side storage.
68
+ - **SE-04, SE-04a** (JWT / Token revocation) → **N/A**: auth is handled by the remote backend.
69
+ - **SE-05** (Roles and permissions) → **N/A**: authorization is handled server-side.
70
+ - **SE-06** (Audit log) → **N/A**: no server logs.
71
+ - **SE-13** (Containers) → **N/A** if deployed on CDN/Netlify/Vercel.
72
+ - **SE-01** (TLS) → adapts: TLS is terminated upstream (CDN, host). Only check that the site is served over HTTPS and that API calls are over HTTPS.
73
+ - **SE-12** (Network security) → reduced: check CSP, CORS, security headers.
74
+
75
+ ### Library / SDK
76
+ - **SE-01, SE-04, SE-04a, SE-05, SE-06, SE-07, SE-07a, SE-08, SE-11, SE-12** → **N/A**: not applicable to a library.
77
+ - **SE-03** (Rotation) → Focus: make sure no secret is included in the published package (`npm pack --dry-run`, `.npmignore`).
78
+ - **SE-09** (Patching) → stays critical: clean dependencies with no known vulnerabilities.
79
+ - **SE-13** (Containers) → **N/A** unless the library publishes a Docker image.
80
+
81
+ ### Application without containers
82
+ - **SE-13** (Containers) → **N/A**.
83
+
84
+ ## Output format
85
+
86
+ ```markdown
87
+ ## Security - Overall score: X.X/4 (Y questions scored out of 16)
88
+
89
+ ### Summary
90
+ [2-3 sentences summarizing the security maturity]
91
+
92
+ ### Detail by question
93
+
94
+ | Code | Question | Criticality | Level | Confidence | Justification |
95
+ |------|----------|-----------|--------|-----------|---------------|
96
+ | SE-01 | TLS 1.2+ / TLS 1.3 | must | X | high/medium/low | ... |
97
+ | SE-02 | DB encryption (AES-256) of sensitive data | must | X | high/medium/low | ... |
98
+ | SE-02a | Encryption key management | must | X | high/medium/low | ... |
99
+ | SE-03 | Key/secret rotation | must | X | high/medium/low | ... |
100
+ | SE-04 | JWT challenge | must | X | high/medium/low | ... |
101
+ | SE-04a | Token revocation mechanism | must | X | high/medium/low | ... |
102
+ | SE-05 | Fine-grained roles and permissions for internal systems | must | X | high/medium/low | ... |
103
+ | SE-06 | Access audit log | must | X | high/medium/low | ... |
104
+ | SE-07 | Security incident response plan | must | X | high/medium/low | ... |
105
+ | SE-07a | Crisis communication | should | X | high/medium/low | ... |
106
+ | SE-08 | SIEM detection | should | X | high/medium/low | ... |
107
+ | SE-09 | Patching & communication | must | X | high/medium/low | ... |
108
+ | SE-10 | Security post-mortem | should | X | high/medium/low | ... |
109
+ | SE-11 | Federated authentication and identity management | must | X | high/medium/low | ... |
110
+ | SE-12 | Network security and perimeter protection | must | X | high/medium/low | ... |
111
+ | SE-13 | Security of containers and deployed images | must | X | high/medium/low | ... |
112
+
113
+ ### Strengths
114
+ - ...
115
+
116
+ ### Weaknesses
117
+ - ...
118
+
119
+ ### Recommendations
120
+ 1. [MUST] ...
121
+ 2. [SHOULD] ...
122
+ 3. [COULD] ...
123
+
124
+ ### Non-auditable items
125
+ - [List here anything impossible to verify by static analysis: runtime config, external WAF, pentest results, etc.]
126
+ ```
127
+
128
+ ## Exit condition
129
+
130
+ - [ ] Project type identified, N/A questions marked
131
+ - [ ] All 16 questions evaluated (or justified N/A)
132
+ - [ ] Verification commands run for each scored question
133
+ - [ ] Level (0-4) + confidence + justification per question
134
+ - [ ] Domain score computed (average excluding N/A, "X scored out of Y")
135
+ - [ ] Report produced in the output format
136
+ - [ ] Non-auditable items listed
137
+
138
+ ## Changelog
139
+
140
+ - 1.0.0 (2026-06-19) - initial versioned release + state-of-the-art enrichment (routing, context, protocol, traps, exit condition); audit grids in reference/ (progressive disclosure)
@@ -0,0 +1,98 @@
1
+ # Authentication & Identity section
2
+
3
+ Questions: SE-04 (JWT), SE-04a (Token revocation), SE-11 (Federated authentication).
4
+
5
+ ## Table of contents
6
+
7
+ - [SE-04 - JWT challenge](#se-04--jwt-challenge--criticality-must)
8
+ - [SE-04a - Token revocation mechanism](#se-04a--token-revocation-mechanism--criticality-must)
9
+ - [SE-11 - Federated authentication and identity management](#se-11--federated-authentication-and-identity-management--criticality-must)
10
+
11
+ ---
12
+
13
+ ### SE-04 - JWT challenge - Criticality: **must**
14
+
15
+ **Analyze:** JWT config, signing algorithms, token lifetime, refresh tokens
16
+
17
+ **Check:**
18
+ - Robust signing algorithm (RS256, ES256 - not HS256 with a weak secret, not alg:none)
19
+ - Short access token lifetime (5-15 min ideally)
20
+ - Refresh tokens with rotation on each use
21
+ - Full validation (signature, expiration, audience, issuer)
22
+ - Secure client-side storage (httpOnly cookies with SameSite)
23
+
24
+ **Commands:**
25
+ ```bash
26
+ grep -riE "jwt\|jsonwebtoken\|jose\|passport\|auth0\|keycloak" package.json composer.json requirements.txt 2>/dev/null
27
+ grep -riE "expiresIn\|ttl\|lifetime\|exp.*=\|token.*expir" . --include="*.ts" --include="*.php" --include="*.py" 2>/dev/null | head -10
28
+ grep -riE "alg.*none\|HS256\|RS256\|ES256" . --include="*.ts" --include="*.php" 2>/dev/null | head -5
29
+ ```
30
+
31
+ **Levels:**
32
+ | Level | Criticality | Criteria |
33
+ |--------|-----------|----------|
34
+ | 0 | must | No JWT or static tokens with no expiration. |
35
+ | 1 | must | JWT with a long expiration (>24h). No refresh token. |
36
+ | 2 | must | JWT with a reasonable expiration (1h). Refresh token. No revocation. |
37
+ | 3 | must | Short-lived tokens (<15min). Refresh rotation. Blacklist for revocation. |
38
+ | 4 | must | Token binding. JWE for sensitive data. Proof of possession. Regular security audit. |
39
+
40
+ ---
41
+
42
+ ### SE-04a - Token revocation mechanism - Criticality: **must**
43
+
44
+ **Dependency:** Evaluate only if SE-04 >= level 2.
45
+
46
+ **Analyze:** Blacklist mechanisms, token versioning, introspection, session management
47
+
48
+ **Check:**
49
+ - Ability to revoke a token before expiration (logout, compromise)
50
+ - Revocation mechanism (Redis blacklist, token versioning, introspection)
51
+ - Invalidation of all tokens on a password change
52
+ - Fast propagation of revocation (real-time or near real-time)
53
+
54
+ **Commands:**
55
+ ```bash
56
+ grep -riE "blacklist\|blocklist\|revoke\|invalidat\|token.version\|introspect" . --include="*.ts" --include="*.php" --include="*.py" 2>/dev/null | head -10
57
+ grep -riE "redis.*token\|cache.*token\|token.*cache" . --include="*.ts" --include="*.php" 2>/dev/null | head -5
58
+ ```
59
+
60
+ **Levels:**
61
+ | Level | Criticality | Criteria |
62
+ |--------|-----------|----------|
63
+ | 0 | must | No revocation possible. Wait for expiration. |
64
+ | 1 | must | Change the global secret (invalidates all tokens). |
65
+ | 2 | must | Blacklist of revoked tokens. Check on every request. |
66
+ | 3 | must | Per-user token versioning. Granular revocation. |
67
+ | 4 | must | Distributed token revocation. Real-time propagation. Token introspection. |
68
+
69
+ ---
70
+
71
+ ### SE-11 - Federated authentication and identity management - Criticality: **must**
72
+
73
+ **Analyze:** Centralized IdP, SSO, OIDC/SAML protocols, MFA, session management, provisioning/deprovisioning
74
+
75
+ **Check:**
76
+ - Centralized IdP (Okta, Azure AD/Entra ID, Keycloak, Google Workspace)
77
+ - SSO for all applications (no separate credentials per app)
78
+ - Standard protocols (OIDC, SAML 2.0)
79
+ - MFA enabled (ideally phishing-resistant: FIDO2/WebAuthn)
80
+ - Session management (expiration, revocation, multi-device)
81
+ - Conditional access policies (context, device, location)
82
+ - Automated provisioning/deprovisioning (SCIM)
83
+
84
+ **Commands:**
85
+ ```bash
86
+ grep -riE "oidc\|saml\|sso\|oauth\|keycloak\|okta\|azure.ad\|entra\|auth0" . --include="*.ts" --include="*.php" --include="*.yml" --include="*.json" 2>/dev/null | head -10
87
+ grep -riE "mfa\|multi.factor\|2fa\|totp\|fido\|webauthn\|passkey" . --include="*.ts" --include="*.php" 2>/dev/null | head -10
88
+ grep -riE "scim\|provisioning\|deprovisioning" . --include="*.yml" --include="*.md" 2>/dev/null | head -5
89
+ ```
90
+
91
+ **Levels:**
92
+ | Level | Criticality | Criteria |
93
+ |--------|-----------|----------|
94
+ | 0 | must | Passwords only. No SSO. Decentralized identity management. |
95
+ | 1 | must | Basic SSO for a few applications. No generalized MFA. |
96
+ | 2 | must | Centralized IdP (Okta, Azure AD). MFA enabled for critical access. |
97
+ | 3 | must | OIDC/SAML for all applications. Conditional access policies. Session management with expiration and revocation. |
98
+ | 4 | must | Zero Trust identity. Continuous and adaptive authentication. Passwordless (FIDO2/WebAuthn). Risk-based MFA. |
@@ -0,0 +1,66 @@
1
+ # Authorization & Audit log section
2
+
3
+ Questions: SE-05 (Roles and permissions), SE-06 (Access audit log).
4
+
5
+ ## Table of contents
6
+
7
+ - [SE-05 - Fine-grained roles and permissions for internal systems](#se-05--fine-grained-roles-and-permissions-for-internal-systems--criticality-must)
8
+ - [SE-06 - Access audit log](#se-06--access-audit-log--criticality-must)
9
+
10
+ ---
11
+
12
+ ### SE-05 - Fine-grained roles and permissions for internal systems - Criticality: **must**
13
+
14
+ **Analyze:** Authorization middleware, guards, policies, defined roles, cloud IAM, Kubernetes RBAC
15
+
16
+ **Check:**
17
+ - Explicit authorization model (RBAC, ABAC)
18
+ - Least-privilege principle applied (infra, DB, app, CI/CD)
19
+ - No shared accounts
20
+ - Separation of duties
21
+ - Periodic permission review
22
+ - Server-side verification (not client-side only)
23
+
24
+ **Commands:**
25
+ ```bash
26
+ grep -riE "guard\|policy\|role\|permission\|rbac\|abac\|gate\|authorize" . --include="*.ts" --include="*.php" --include="*.py" 2>/dev/null | head -10
27
+ grep -riE "iam\|serviceAccount\|clusterRole" . --include="*.yml" --include="*.yaml" --include="*.tf" 2>/dev/null | head -10
28
+ ```
29
+
30
+ **Levels:**
31
+ | Level | Criticality | Criteria |
32
+ |--------|-----------|----------|
33
+ | 0 | must | Shared accounts. Generalized admin access. |
34
+ | 1 | must | Individual accounts but roles too broad (admin/user). |
35
+ | 2 | must | RBAC defined. Least-privilege principle applied. Documentation. |
36
+ | 3 | must | Granular RBAC. Quarterly access review. Separation of duties. |
37
+ | 4 | must | ABAC (Attribute-Based). Just-in-time access. Privileged Access Management (PAM). |
38
+
39
+ ---
40
+
41
+ ### SE-06 - Access audit log - Criticality: **must**
42
+
43
+ **Analyze:** Audit logs, access traceability, immutability, retention, SIEM integration
44
+
45
+ **Check:**
46
+ - Structured audit logs (who, what, when, on which data, result)
47
+ - Separation of audit logs / application logs
48
+ - Log immutability (append-only, tamper-proof)
49
+ - Defined and compliant retention (GDPR, SOC 2)
50
+ - Alerts on abnormal behavior
51
+
52
+ **Commands:**
53
+ ```bash
54
+ grep -riE "audit.log\|auditLog\|activity.log\|access.log" . --include="*.ts" --include="*.php" --include="*.py" 2>/dev/null | head -10
55
+ grep -riE "log.*action\|log.*event\|log.*access\|log.*change" . --include="*.ts" --include="*.php" 2>/dev/null | head -10
56
+ grep -riE "cloudtrail\|s3.*log\|immutable\|append.only\|worm" . --include="*.tf" --include="*.yml" 2>/dev/null | head -5
57
+ ```
58
+
59
+ **Levels:**
60
+ | Level | Criticality | Criteria |
61
+ |--------|-----------|----------|
62
+ | 0 | must | No audit log. Access untracked. |
63
+ | 1 | must | Basic application logs. No structured who/what/when. |
64
+ | 2 | must | Structured audit log for sensitive actions. Defined retention. |
65
+ | 3 | must | Full audit (CRUD on sensitive data). Tamper-proof. Alerts on anomalies. |
66
+ | 4 | must | Centralized audit log. Automatic compliance. Forensics-ready. SIEM integrated. |