fix(filters): always drop .netrc/_netrc credential files from lineage#135
Open
christophergeyer wants to merge 2 commits into
Open
fix(filters): always drop .netrc/_netrc credential files from lineage#135christophergeyer wants to merge 2 commits into
christophergeyer wants to merge 2 commits into
Conversation
Credential files (.netrc, _netrc) were being recorded as run inputs whenever a tool (curl, requests, huggingface_hub, wandb) read them for auth — e.g. the nanochat ClimbMix download recorded /home/ubuntu/.netrc as an input. They hold secrets, not reproducibility-relevant data. Filter them from inputs and outputs unconditionally, mirroring _is_git_metadata, i.e. independent of filters.ignore_paths so a user clearing that list cannot re-expose them. Adds a credential_files filter category (count + "creds" label). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
What
Always filter
.netrc/_netrcfrom provenance — reads and writes — regardless of filter config. These hold machine login tokens (wandb, huggingface, curl/requests) and are not reproducibility-relevant.Why
A nanochat e2e run on Lambda (verifying #133 + #134 against dev) surfaced
~/.netrcas a tracked artifact: wandb reads it at startup, so the tracer captured it. Only the path+hash reach GLaaS (not contents), but a credential file appearing in lineage is undesirable and confusing. It belongs in the same always-dropped bucket as.gitmetadata and roar-internal files — not gated behindfilters.*config (a user clearingignore_pathsmust not re-expose it).Change
New
credential_filesfilter category (parallel toroar_internal/git_metadata):Applied in both
categorize_read(inputs) and the written-files loop (outputs). Surfaced in run-report verbosity output like the other categories.Tests
test_file_filter.py:.netrcand_netrcdropped from reads + writes.test_verbosity.py: credential-files count rendered in the report.Scope
Deliberately minimal — just the netrc family (the observed leak). Follow-ups could add
.aws/credentials,.ssh/id_*,.config/gcloud/, etc., but those merit their own discussion (some are already covered by system-path filters; SSH keys are trickier since pubkeys are sometimes legitimately tracked).🤖 Generated with Claude Code