docs: add vulnerability report template and owners to SECURITY.md - #652
Open
Rafiat30 wants to merge 1 commit into
Open
docs: add vulnerability report template and owners to SECURITY.md#652Rafiat30 wants to merge 1 commit into
Rafiat30 wants to merge 1 commit into
Conversation
SECURITY.md documented a 90-day disclosure window but gave reporters no structured way to file a report and no named contact for coordination - just an email address and a promise. There was also no link to it from README, so a reader auditing the repo for a security process had nothing to find it by. - Add .github/SECURITY_REPORT_TEMPLATE.md: a copy-into-your-email template covering affected component, vulnerability class, severity estimate, reproduction steps, impact, suggested fix, and disclosure preferences, plus a reminder not to file it as a public GitHub issue. - Rewrite SECURITY.md: add a Scope section (which crates/tooling this policy covers), point reporters at the new template, add concrete acknowledgment/assessment timelines instead of just "we aim to", and add a Report Owners section naming a primary security contact. - Link SECURITY.md from README.md's new Security section. - Add scripts/check_security_docs.sh, which checks that SECURITY.md references the template file and a contact address, and that README.md links to SECURITY.md - catching the docs drifting back out of sync with each other. Wired into `make all` as a new check_security_docs target. - Add scripts/tests/check_security_docs_smoke_test.sh, covering a consistent set of docs, a missing template file, SECURITY.md missing the template reference, SECURITY.md missing a contact address, and a README missing the SECURITY.md link - wired into the existing test_scripts target. Closes Betta-Pay#546
|
@Rafiat30 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #546
Summary
SECURITY.mddocumented a 90-day disclosure window but gave reporters no structured format to file a report in and no named contact for coordination beyond a bare email address. There was also no link to it fromREADME.md, so someone auditing the repo for a security process had no obvious way to find it.This adds a copy-into-your-email report template, expands
SECURITY.mdwith scope, concrete response timelines, and a named report owner, links it from the README, and adds a CI check that keeps all three in sync going forward.Changes
New files
.github/SECURITY_REPORT_TEMPLATE.md— a template reporters copy into their email to security@bettapay.com. Covers: summary, affected component (checkboxes for each crate + tooling), vulnerability class, a self-assessed severity level, reproduction steps/PoC, impact, an optional suggested fix, and disclosure preferences (credit name, contact method, any deadline constraints). Opens with an HTML comment reminding reporters not to file this as a public GitHub issue/discussion/PR.scripts/check_security_docs.sh— verifiesSECURITY.mdreferences the template file and lists asecurity@contact address, and thatREADME.mdlinks toSECURITY.md. Follows the existingscripts/check_wasm_size.shpattern (sourcesscripts/lib/common.sh, honors aROOT_DIRoverride for testability).scripts/tests/check_security_docs_smoke_test.sh— exercises the check script against fixture docs in amktemp -dsandbox, following the same pattern as the existingscripts/tests/tooling_smoke_test.sh.Modified files
SECURITY.md— added a Scope section (which crates/tooling this policy covers, and a pointer to where frontend/backend issues should go instead); reworded the reporting section to point at the new template and to draw a clearer line between what needs a private report vs. what's fine as a normal public issue; replaced the vague "we aim to acknowledge" with three concrete commitments (48h acknowledgment, 5-business-day initial assessment, ongoing updates + credit); added a Report Owners section naming a primary security contact and what to do if you don't hear back in 48 hours.README.md— new Security section (after Dependencies) linking toSECURITY.md.Makefile— added acheck_security_docstarget wired intomake all, and added the new smoke test to the existingtest_scriptstarget.No contract (Rust) source changed in this PR.
Implementation details
@therealjhayas the primary security contact — the same real, most-active contributor (237 contributions viagh api repos/Betta-Pay/BettaPay-Contract/contributors, vs. 21 for the next-highest) I used as the CODEOWNERS owner in a companion PR for No ownership/CODEOWNERS for document vs code changes #547. I deliberately did not reference.github/CODEOWNERSfromSECURITY.mdin this PR, since that file doesn't exist onmainyet (it's introduced in the separate No ownership/CODEOWNERS for document vs code changes #547 PR) — this PR needs to stand on its own regardless of merge order.SECURITY.md, so a reporter can literally copy the whole file into an email without needing to extract a section out of a longer policy document.Tests added
scripts/tests/check_security_docs_smoke_test.shcovers, each against a disposable fixture repo inmktemp -d:security@contact address fails.I also manually ran
bash scripts/check_security_docs.shagainst this PR's real docs (passes) before finalizing the smoke test.How to test