@metasession.co/devaudit-cli 0.1.37 → 0.1.38

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metasession.co/devaudit-cli",
3
- "version": "0.1.37",
3
+ "version": "0.1.38",
4
4
  "description": "DevAudit CLI — installs, syncs, and operates the Metasession SDLC across consumer projects.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@clack/prompts": "^0.8.2",
36
- "@metasession.co/devaudit-plugin-sdk": "^0.1.37",
36
+ "@metasession.co/devaudit-plugin-sdk": "^0.1.38",
37
37
  "commander": "^12.1.0",
38
38
  "consola": "^3.2.3",
39
39
  "env-paths": "^3.0.0",
@@ -218,54 +218,62 @@ jobs:
218
218
  # consumer's portal base URL — fall back to the SDLC docs when
219
219
  # DEVAUDIT_BASE_URL isn't set in the workflow env.
220
220
  BASE="${DEVAUDIT_BASE_URL:-https://github.com/metasession-dev/DevAudit-Installer/blob/main/docs/governance-templates.md}"
221
- PR_BODY=$(cat <<PRBODY
222
- Auto-generated quarterly periodic-review for **${REVIEW_ID}** by the \`Periodic Review\` workflow.
223
-
224
- ## What auto-filled (~40%)
225
-
226
- - Review-period metrics: releases shipped, gate pass rate, SAST + dependency findings, audit-log volume, open issues
227
- - Frontmatter (\`review_id\`, period dates, generated_at)
228
- - Section 2 control-area headers wired to the right framework clauses
229
-
230
- ## What still needs the operator (~60%)
231
-
232
- Each item below corresponds to a section of the doc. **Tick the box once the section is non-stub** leaving REPLACE markers in place will fail audit review and the merge bar.
233
-
234
- ### §3 Review notes
235
- - [ ] Qualitative observations on the review period (≥2 sentences; no \`REPLACE\` text remaining)
236
- - [ ] Cross-reference any incidents from this period (\`compliance/governance/incident-report-*.md\`)
237
-
238
- ### §4 Control-effectiveness judgement
239
- *Closes \`SOC2.CC4.1\` + \`ISO27001.A.12.1\` only when ALL control areas have a non-stub judgement.*
240
-
241
- - [ ] Access control (ISO 27001 A.5.15) — effective / partially / not + 1-line evidence
242
- - [ ] Secure SDLC (ISO 27001 A.8.25) — judgement + evidence
243
- - [ ] Secure coding (ISO 27001 A.8.28) judgement + evidence (SAST + dep-audit pass rate)
244
- - [ ] Security testing (ISO 27001 A.8.29) judgement + evidence (E2E pass rate)
245
- - [ ] Change management (ISO 27001 A.8.32 + SOC 2 CC8.1) — judgement + evidence (four-eyes approvals count)
246
- - [ ] Monitoring activities (ISO 27001 A.8.16 + EU AI Act Art. 12) — judgement + evidence (audit-log volume / coverage)
247
-
248
- ### §5 Follow-up actions
249
- - [ ] Each material finding owner due date (or "none for this period" stated explicitly)
250
- - [ ] Carry-over actions from last quarter's review status updated
251
-
252
- ### §6 Sign-off
253
- - [ ] Reviewer name + date (must be different from the actor who made code changes that the review is judging)
254
- - [ ] Approver name + date (when \`risk_tier\` is medium or higherdual-actor required)
255
-
256
- ## Closes once merged
257
-
258
- - \`SOC2.CC4.1\` (Monitoring of internal controls)
259
- - \`ISO27001.A.12.1\` (Operational procedures and responsibilities)
260
-
261
- Verify at \`${BASE}/projects/<slug>/compliance\` after the PR-merge push lands on develop both clauses should flip MISSING COVERED within ~2 minutes. Stays COVERED for 365 days (portal's \`freshnessDays\`), then flips to EXPIRED until the next quarterly review.
262
-
263
- See [\`docs/governance-templates.md\`](https://github.com/metasession-dev/DevAudit-Installer/blob/main/docs/governance-templates.md#soc-2--trust-services-criteria) for full guidance.
264
- PRBODY
265
- )
221
+ # Assemble the PR body via printf to a temp file. We avoided
222
+ # a heredoc here because <<PRBODY preserves leading whitespace
223
+ # literally — and any body line at YAML column 1 breaks the
224
+ # surrounding `run: |` block scalar (prettier-yaml fails with
225
+ # "collection cannot be both a mapping and a sequence").
226
+ # printf '%s\n' …list of lines… keeps every line inside the
227
+ # block scalar's indentation discipline.
228
+ PR_BODY_FILE=$(mktemp)
229
+ printf '%s\n' \
230
+ "Auto-generated quarterly periodic-review for **${REVIEW_ID}** by the \`Periodic Review\` workflow." \
231
+ "" \
232
+ "## What auto-filled (~40%)" \
233
+ "" \
234
+ "- Review-period metrics: releases shipped, gate pass rate, SAST + dependency findings, audit-log volume, open issues" \
235
+ "- Frontmatter (\`review_id\`, period dates, generated_at)" \
236
+ "- Section 2 control-area headers wired to the right framework clauses" \
237
+ "" \
238
+ "## What still needs the operator (~60%)" \
239
+ "" \
240
+ "Each item below corresponds to a section of the doc. **Tick the box once the section is non-stub** — leaving REPLACE markers in place will fail audit review and the merge bar." \
241
+ "" \
242
+ "### §3 Review notes" \
243
+ "- [ ] Qualitative observations on the review period (≥2 sentences; no \`REPLACE\` text remaining)" \
244
+ "- [ ] Cross-reference any incidents from this period (\`compliance/governance/incident-report-*.md\`)" \
245
+ "" \
246
+ "### §4 Control-effectiveness judgement" \
247
+ "*Closes \`SOC2.CC4.1\` + \`ISO27001.A.12.1\` only when ALL control areas have a non-stub judgement.*" \
248
+ "" \
249
+ "- [ ] Access control (ISO 27001 A.5.15) effective / partially / not + 1-line evidence" \
250
+ "- [ ] Secure SDLC (ISO 27001 A.8.25) judgement + evidence" \
251
+ "- [ ] Secure coding (ISO 27001 A.8.28) — judgement + evidence (SAST + dep-audit pass rate)" \
252
+ "- [ ] Security testing (ISO 27001 A.8.29) — judgement + evidence (E2E pass rate)" \
253
+ "- [ ] Change management (ISO 27001 A.8.32 + SOC 2 CC8.1) judgement + evidence (four-eyes approvals count)" \
254
+ "- [ ] Monitoring activities (ISO 27001 A.8.16 + EU AI Act Art. 12) judgement + evidence (audit-log volume / coverage)" \
255
+ "" \
256
+ "### §5 Follow-up actions" \
257
+ "- [ ] Each material finding → owner → due date (or \"none for this period\" stated explicitly)" \
258
+ "- [ ] Carry-over actions from last quarter's review → status updated" \
259
+ "" \
260
+ "### §6 Sign-off" \
261
+ "- [ ] Reviewer name + date (must be different from the actor who made code changes that the review is judging)" \
262
+ "- [ ] Approver name + date (when \`risk_tier\` is medium or higher — dual-actor required)" \
263
+ "" \
264
+ "## Closes once merged" \
265
+ "" \
266
+ "- \`SOC2.CC4.1\` (Monitoring of internal controls)" \
267
+ "- \`ISO27001.A.12.1\` (Operational procedures and responsibilities)" \
268
+ "" \
269
+ "Verify at \`${BASE}/projects/<slug>/compliance\` after the PR-merge push lands on develop — both clauses should flip MISSING → COVERED within ~2 minutes. Stays COVERED for 365 days (portal's \`freshnessDays\`), then flips to EXPIRED until the next quarterly review." \
270
+ "" \
271
+ "See [\`docs/governance-templates.md\`](https://github.com/metasession-dev/DevAudit-Installer/blob/main/docs/governance-templates.md#soc-2--trust-services-criteria) for full guidance." \
272
+ > "$PR_BODY_FILE"
266
273
  gh pr create --base develop --head "${BRANCH}" \
267
274
  --title "chore(compliance): periodic review ${REVIEW_ID}" \
268
- --body "$PR_BODY"
275
+ --body-file "$PR_BODY_FILE"
276
+ rm -f "$PR_BODY_FILE"
269
277
  else
270
278
  echo "PR #${EXISTING} already open for this period — branch updated in place."
271
279
  fi