Repository navigation
docs: add a security policy - #1691
Merged
Merged
Conversation
The security label tells reporters to see SECURITY.md for private reports, and no such file existed. Add one at the root. It names GitHub's private vulnerability reporting as the channel, says only main's latest commit is supported while Morphic has no release, and draws the trust line the README's bounds imply: the spec and every document it references are untrusted, while the caller's options and code are not. Input that gets past a bound, by reading a file or URL it should not, or by crashing or exhausting the process instead of ending in a diagnostic, is a vulnerability. With allow-external-refs set the spec is trusted to name what it reads, but a document fetched over the network still is not.
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.
Summary
The
securitylabel's description sends reporters toSECURITY.mdfor private reports, and thefile did not exist. This adds it at the root, where GitHub lists it as the repository's security
policy.
(
gh api repos/dexpace/morphic/private-vulnerability-reporting→{"enabled":true}).main's latest commit is supported.an option names, and the code a library caller hands in are trusted. A vulnerability is input
that gets past a bound the README states: a
$refread outside the spec's directory withoutallow-external-refs, or a document that crashes or exhausts the process instead of ending in adiagnostic. With
allow-external-refsset, the spec is trusted to name what it reads, but adocument fetched over the network is not. Wrong or lossy IR, and the cost of a budget the caller
raised or turned off, are not vulnerabilities. A weakness already filed under the
securitylabel goes on that issue.
The policy states no response time or disclosure deadline, because none has been agreed; one can
be added when there is. It is a repository policy, not an organisation default in
dexpace/.github, which would cover every dexpace repository and is the organisation's to add.Closes #1028
Test plan
At 77f8297:
go run ./cmd/morphic compile:$refwritten as../, an absolute path, afile:URI, anhttp://127.0.0.1URL, or asymbolic link out of the spec's directory: each is refused as
openapi/unresolved-ref, and thereferenced file's text is absent from the output. With
--opt allow-external-refs=truethesame local files resolve, so the probe tells the two settings apart.
allow-external-refs=true, a document served over HTTP whose$refnames a local file,by absolute path or by
file:URI: refused, and the file's text is absent from the output.openapi/alias-amplification.max-source-bytes=40,max-source-nodes=5andmax-enum-members=2on a three-member enum each giveopenapi/budget-exceeded.go test ./internal/archtestpasses. A link to a headingREADME.mdlacks, planted inSECURITY.md, failsTestDocuments_LinksResolve, so the check reads the new file.gh api repos/dexpace/morphic/community/profile --jq '.files.security'names thefile. The profile reads only the default branch, so this cannot run before then.