Repository navigation
fix: a read of the house does not hand over a file that keeps a secret - #151
Merged
Merged
Conversation
A reading operation of this package is given to a session, and it returned a slice of any file inside the app root. Inside the root sit the files where a house keeps a secret: its environment file and the family beside it (any name beginning «.env»), the envelope a declared key is written to, and Composer's credentials. A secret has one place to live, and that is not the answer to a read. What a secret file is is named in one place, and a read withholds any path that is one of them or ends in one of them — a copy a trial kept under var/trials/<id>/copy/ is the same secret, and a house that has not discarded its old trials still holds it. The match ignores case, so a case-insensitive filesystem cannot reach one by its upper-case name. A file that only resembles one — a secrets.json outside .milpa, an auth.json with a suffix, a committed «.env» template (.env.example, .env.dist, .env.template, .env.sample) — reads as always, and no refusal carries the value.
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.
A reading operation of this package is given to a session, and it
returned a slice of any file inside the app root. Inside the root sit
the files where a house keeps a secret: its environment file and the
family beside it (any name beginning
.env), the envelope a declaredkey is written to, and Composer's credentials. A secret has one place
to live, and that is not the answer to a read.
A read now withholds any path that IS one of those files or ENDS in one
of them — a copy a trial kept under
var/trials/<id>/copy/is the samesecret — matched by the tail of the path, without regard to case. A
file that only resembles one (a
secrets.jsonoutside.milpa, anauth.jsonwith a suffix, a committed.envtemplate) reads as always,and no refusal carries the value.
Coordinated disclosure: getmilpa/devtools GHSA-wfm7-r7x9-2r79, paired
with getmilpa/app-runtime GHSA-qjrx-c9gx-h25h. Release before the
app-runtime patch that requires this version.