pipe subcommand ignores --sse-kms-encryption-context flag
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
Research direction
Read command/pipe.go around lines 71 and 197, then compare the flag lookup with command/cp.go around line 379. Inspect e2e/pipe_test.go and the helpers in e2e/util_test.go to see how encryption context is checked; run the pipe end-to-end test. Done when the flag value reaches the upload request and the test verifies the context.
Written by the indexing model from the issue text.
Description
Description of Bug & Impact
In command/pipe.go, the flag for KMS encryption context is defined as:
cli.StringFlag{
Name: "sse-kms-encryption-context",
Usage: "an optional KMS encryption context",
}
(see command/pipe.go#L71).
However, in command/pipe.go#L197, the value is read via:
kmsKeyContext := c.String("sse-context")
Because "sse-context" is not a registered flag name on the subcommand, c.String("sse-context") always evaluates to an empty string. Consequently, any --sse-kms-encryption-context passed to s5cmd pipe is silently ignored and omitted from the S3 upload request.
(In contrast, command/cp.go#L379 correctly queries c.String("sse-kms-encryption-context").)
Root Cause & Test Coverage Gap
In e2e/pipe_test.go#L487-L532, ensureEncryptionContext(...) is called, but in e2e/util_test.go#L589 and L642-L645, the mock/check helper never compares or verifies the KMS encryption context on the resulting S3 object. The existing end-to-end test passes even with the flag name mismatch present.
Proposed Fix
In command/pipe.go:
- kmsKeyContext := c.String("sse-context")
+ kmsKeyContext := c.String("sse-kms-encryption-context")
And update e2e/util_test.go so ensureS3Object / ensureEncryptionContext actively asserts the context received by the fake/mock S3 backend.
- Dominant language
- Go
- Stars
- 46
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Getting set up
- Ships a 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 anthropics/s5cmd
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
anthropics/s5cmd#39 · 4 reactions ·
All issues in anthropics/s5cmd
Similar issues
-
Sign-off cards drift between formats; write down one card formatPossibly taken @keyxmakerx claimed this today. Opendocumentation
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
keyxmakerx/Chronicle#2795 ·
Maintainers usually reply within 1 day
-
bug enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 2 days
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
refactor review: high
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
1lck/Lithe-IDEA#2376 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
OneBusAway/vehicle-positions#614 ·
Maintainers usually reply within 1 day