Repository navigation
fix(template): keep in-template symlinks and never read through them - #182
Merged
Merged
Conversation
GH-175) CopyDir recreates a link that resolves inside the copied tree and skips (and returns) one that is absolute, escapes at any step of its chain, or dangles. Callers warn about the skipped links.
…ugh them (GH-175) Execute recreates a link that resolves inside template/ with its target rendered like a file name, and skips out-of-bounds and dangling links with a warning. Links whose rendered target is not in the output are removed. Analysis and validate no longer read through links, and template validate reports skipped links with exit bit 8.
…GH-175) CheckLinks runs wherever a template is cloned: specs use <git-url>, template download and remote upgrades. A remote upgrade now clones into a staging dir and only replaces the registered template once the check passes.
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 #175
Summary
template/stay symlinks (file, directory and chained links); their target is rendered like a file name, so.node-version → {{ .Name }}.rcpoints at the rendered nameCopyDirrecreates in-bounds links and skips the rest, so the local → temp and temp → target copies no longer flatten or read through themtemplate/are rejected inspecs use <git-url>,template downloadand remotetemplate upgrade;template validatereports skipped links with exit bit8Decisions and skipped steps
template/: it stops pointing at the template once the template is copiedtemplate/makes a link out of bounds, even if a later step comes back intemplate download --forcekeeps its existing behaviour on rejection: the old template has already been removed, as with reserved variable names../xis written outside the output directory; unrelated to symlinks, filed as Rendered file names are not bounds-checked: a template can write outside the output directory #183