Refuse a non-loopback NEMAR_TEST_S3_ENDPOINT in production readers
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 77/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- aws, typescript
Research direction
Read src/lib/git-annex/s3-remote.ts around readBucketAnnexUuid and src/lib/git-annex/remote-verify.ts around s3Endpoint. Check how both readers obtain NEMAR_TEST_S3_ENDPOINT, then add tests for loopback URLs and rejected non-loopback URLs. Done means both readers accept only 127.0.0.1, ::1, or localhost and return a clear error for other hosts.
Written by the indexing model from the issue text.
Description
Found in the review of #2783 (epic #2713). Two production paths read NEMAR_TEST_S3_ENDPOINT from the environment (added in #2675): src/lib/git-annex/s3-remote.ts readBucketAnnexUuid (:870) and :186). If a real finalize ran with the variable set, the bucket marker read would go to that host signed with the real AWS credentials: the access key id and a one-GET replayable signature are exposed (not the secret), and the host can answer any uuid. Setting it needs control of the process environment, no workflow sets it, and content still goes where the git-annex record points. Fix: both readers accept only a loopback URL (127.0.0.1, ::1, localhost) and refuse anything else with a clear error; test both.src/lib/git-annex/remote-verify.ts s3Endpoint (
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 1
- Avg merge
- 4h 48m
- Merged PRs (30d)
- 468
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nemarOrg/nemar-cli
-
testing
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
All issues in nemarOrg/nemar-cli
Similar issues
-
Codex使用可 かんたん コード
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ryuki-moro/Nicomaru#348 ·
Maintainers usually reply within 1 day
-
Bug
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
area-integrations
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day