Skip to content

Add an ecosystem security work playbook - #40

Open
francisco-dlp wants to merge 1 commit into
hyperspy:mainfrom
francisco-dlp:security-playbook
Open

francisco-dlp wants to merge 1 commit into
hyperspy:mainfrom
francisco-dlp:security-playbook

Conversation

@francisco-dlp

@francisco-dlp francisco-dlp commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Description of the change

Add an initial, canonical security-work playbook for the HyperSpy ecosystem. This centralizes decision discipline rather than security implementation code: demonstrated impact, upstream/package/application ownership, minimum effective fixes, evidence, dependency and CI/CD review, bounded AI-agent execution, coordinated disclosure, residual risk, and post-release learning. Fixes and tests remain in the repository that owns the behavior.

Documents added:

  • SECURITY-PLAYBOOK.md (304 lines): the full ecosystem security lifecycle, including code execution/injection, deserialization, file access, supply chain, CI/CD, sensitive data, and resource exhaustion. It explicitly rejects generalized guard frameworks and exhaustive resource-exhaustion guards by default.
  • SECURITY-AGENT-BRIEF.md: a copy-paste TASK / DELIVERABLE / SCOPE / VERIFY / STOP WHEN template with exact-command fields, positive controls, review caps, authorization, cleanup, disclosure, and residual-risk requirements. The tool and model are resolved from the active AI tool's configuration or session metadata when used; neither is hard-coded.
  • SECURITY-LESSONS.md: general references separated from four publicly verifiable I/O and deserialization examples (NumPy, SymPy, h5py#2891, and Option(s) to disable various kinds of external file access HDFGroup/hdf5#6618), with primary URLs, review dates, and revisit triggers.

README.md and CONTRIBUTING.md link these resources. The contributor guide's pre-existing obsolete proposal-process URL is updated to the current proposals repository section.

Proposal: hyperspy/hyperspy-proposals#10 (open; acceptance pending).

AI-assisted contribution?

Progress of the PR

  • Change implemented
  • Tests considered: no prose, exact-wording, or synchronization tests added; existing test suite run
  • Documentation updated
  • Changelog entry not applicable; this repository has no upcoming_changes/ convention
  • Ready for review: remains draft pending proposal acceptance and PR check evaluation

Verification

  • Read every cited primary source on 2026-11-22; h5py and HDF5 issue state and comments were independently retrieved with gh.
  • python3 -m pytest -q tests — 61 passed.
  • Changed-file pre-commit run --files CONTRIBUTING.md README.md SECURITY-AGENT-BRIEF.md SECURITY-LESSONS.md SECURITY-PLAYBOOK.md — passed.
  • Commit-time pre-commit and commit-msg hooks — passed, including both AI-attribution guards.
  • git diff --check and git diff --cached --check — passed.
  • Local Markdown file and heading-fragment validation — no errors.
  • External URL validation — 14 unique URLs, all HTTP 200.
  • Final diff review found no private identifiers, undisclosed case studies, local artifact paths, credentials, test/tooling changes, or shared-guard implementation advice.
  • Amended-head CI on 43ed4aa95b9370b26f5b23a1de5c5084d1c76437: pytest (3.10), pytest (3.12), and pytest (3.14) passed. The smoke job completed with only the pre-existing policy-pin failure described below.

pre-commit run --all-files also invokes the policy-pin hook and reports a one-line AGENTS.md mismatch (pre-commit hook versus CI script). This is pre-existing: upstream main at base SHA 267caabd9579a10d8614d8dcc3cb74f02132b73e fails the same check in https://github.com/hyperspy/.github/actions/runs/45004318001. The automatic unrelated AGENTS.md edit was reverted and is not part of this PR.

Confidentiality and scope

Only public upstream examples are included. No internal HyperSpy/RosettaSciIO case study, private GHSA material, unreleased advisory, remediation detail, proof of concept, or private branch/commit information is included. No security implementation framework, new tooling, workflow, towncrier, Sphinx, or test machinery was added.

Recommended follow-up after this canonical PR merges: add thin AGENTS.md/SECURITY.md links in HyperSpy and RosettaSciIO through separate PRs, then roll the same links out to other ecosystem repositories.

Centralize lifecycle decision guidance, a bounded agent brief, and publicly verifiable lessons. Add organization navigation and update the obsolete proposal-process link.

Assisted-by: OmO:z-ai/glm-5.3-flash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant