Skip to content

security: enable GitHub security defaults (secret scanning, branch protection, dependabot) across PsychQuant org repos #80

@kiki830621

Description

@kiki830621

Problem

From verification of #78 (#78 verify report, finding #2):
「All 3 new repos have secret scanning, branch protection, dependabot, push protection all DISABLED. Org-wide pattern (same as ooxml-swift/word-to-md-swift etc), not a #78 regression but #78 widens the surface.」
— Source: security reviewer, 2026-04-18

The 3 repos extracted by #78 (note-core-swift, note-to-pdf-swift, note-to-html-swift) have zero GitHub security hardening enabled:

gh api /repos/PsychQuant/note-core-swift/security_and_analysis  # → all flags off
gh api /repos/PsychQuant/note-core-swift/branches/main/protection  # → 404

This is not a #78 regression — every PsychQuant org repo (ooxml-swift, word-to-md-swift, common-converter-swift, marker-swift, markdown-swift, word-builder-swift, etc.) has the same posture. #78 widens the attack surface by 3 repos but did not introduce the gap.

Type

enhancement

Expected

For all PsychQuant/* Swift package repos consumed by macdoc (or any production project), the following defaults SHALL be enabled:

  • Secret scanning (free for public repos)
  • Push protection for secrets
  • Dependabot alerts + security updates
  • Branch protection on main:
    • Require pull request before merging (or at minimum, prohibit force-push)
    • Require status checks if CI exists
  • Optional: required signed commits

Actual

Repo Secret scan Push protection Dependabot Branch protection
note-core-swift
note-to-pdf-swift
note-to-html-swift
ooxml-swift
word-to-md-swift
word-builder-swift (just shipped)
common-converter-swift
(others ...) likely all ❌ likely all ❌ likely all ❌ likely all ❌

Strategy

  • Audit all PsychQuant/* repos for current security posture (gh api .../security_and_analysis)
  • Decide on org-level defaults vs per-repo settings
  • Apply baseline (secret scanning + push protection + dependabot + main-branch protection) across all repos
  • Document the standard in macdoc's CLAUDE.md or a separate SECURITY.md
  • Add to release-flow checklist for new packages

Related


Current Status

Phase: closed
Last updated: 2026-04-21 by idd-update (post-close auto-sync)

Key Decisions

  • (2026-04-21) Closed via /idd-close: closing comment at #issuecomment-4287092071; all Strategy checkboxes + Diagnosis Phase-1-4 checklist resolved ([x] done, [-] 2FA won't-fix + per-repo SECURITY.md rejected, [~] private-repo branch protection scoped-out); Gate Check passed.
  • (2026-04-21) Spectra archive: openspec/changes/archive/2026-04-21-psychquant-security-defaults/; new capability spec repository-security-baseline with 8 ADDED requirements now lives at openspec/specs/repository-security-baseline/spec.md.
  • (2026-04-21) 52 repos audited all-green: 39 public full baseline + 14 private alerts-only; ./scripts/audit-security.sh exit 0.
  • (2026-04-21) Private-repo branch protection unavailable on free tier (GitHub Pro required) — spec + SECURITY.md + audit tool updated to mark as expected-out-of-scope.
  • (2026-04-19) Org defaults don't auto-propagate on free-tier orgs — release-flow gate in common-release-flow.md is load-bearing for new packages.
  • (2026-04-19) markdown-swift Dependabot smoke: 0 auto-PRs in 48hr → clean dep tree, safe bulk rollout.
  • (2026-04-19) Complexity = SDD-warranted/spectra-discuss resolved 7 open questions before /spectra-propose.

Scope Changes

  • Added macdoc itself to Phase-2 target list (original spec omitted the umbrella).
  • Private-repo baseline reduced from "alerts + branch protection" to "alerts only" due to free-tier GitHub Pro constraint.
  • Per-repo SECURITY.md copies rejected in favour of single canonical file at macdoc root (per design Non-Goals).
  • 2FA org-wide enforcement explicitly scoped out (per Non-Goals).

Blocking

  • (none — issue closed; working-tree files awaiting commit but not blocking)

Commits

  • (none yet referencing security: enable GitHub security defaults (secret scanning, branch protection, dependabot) across PsychQuant org repos #80macdoc/SECURITY.md, macdoc/scripts/audit-security.sh, target lists, macdoc/openspec/specs/repository-security-baseline/spec.md, archived Spectra change at macdoc/openspec/changes/archive/2026-04-21-psychquant-security-defaults/, and modified ~/Developer/che-claude-config/rules/common-release-flow.md are all uncommitted working-tree changes.)
  • External effects (config-only, no commits): PsychQuant org 5 flags flipped; 39 public repos hardened; 14 private repos have Dependabot alerts enabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions