Repository navigation
[FSSDK-13471] Fix Arnica findings: artipacked workflows, CMAB nil safety, MPL-2.0 docs - #462
Conversation
…ety, MPL-2.0 docs - Add persist-credentials: false to all actions/checkout steps in go.yml, lint_markdown.yml and integration_test.yml so the GitHub token is not left in .git/config. - Make the error path in CMAB GetDecision assign reasons explicitly instead of appending into decision.Reasons. - Document the MPL-2.0 licensed go-multierror and errwrap dependencies in the README credits. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
The README’s MPL-2.0 description could cause binary distributors to overlook source-availability and notice obligations.
1 open issue
What changed in this PR
Addresses Arnica findings by hardening CI checkouts and clarifying error handling and dependency licensing in the Go SDK.
Changes:
- Disable credential persistence in all seven workflow checkout steps.
- Make CMAB fetch-error reason assignment explicit without changing behavior.
- Add credits for MPL-2.0 dependencies and explain their relationship to the SDK’s Apache-2.0 license.
| File | Description |
|---|---|
| README.md | Adds go-multierror and errwrap license credits and explanatory text. |
| pkg/cmab/service.go | Makes error-path reason merging explicit and documents value safety. |
| .github/workflows/lint_markdown.yml | Disables credential persistence for the Markdown checkout. |
| .github/workflows/integration_test.yml | Disables checkout credential persistence and explains later token use. |
| .github/workflows/go.yml | Disables credential persistence in all five Go job checkouts. |
Review effort: Balanced
…-2.0 binary obligations - Revert the pkg/cmab/service.go reasons refactor. It was not needed: fetchDecision returns a Decision value, so the original code was already safe. - Clarify in the README that MPL-2.0 is file-level copyleft but section 3.2 still applies when distributing a compiled binary that includes these packages. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Matjaz Pirnovar (Mat001)
left a comment
There was a problem hiding this comment.
This PR correctly adds persist-credentials: false to all 7 actions/checkout steps across the three workflows that have them (verified — no checkout was missed), and the Go jobs only run make/go test so nothing downstream needs the persisted credentials. The highest-risk case, the CI_USER_TOKEN checkout in integration_test.yml, still receives the token explicitly via env for the trigger script, so disabling persistence doesn't break it. Both earlier review comments are already addressed (the service.go change was reverted, and the README MPL-2.0 note now distinguishes file-level copyleft from the section 3.2 binary-distribution obligation), so this is good to merge.

Summary
persist-credentials: falseto all 7actions/checkoutsteps:go.yml(5),lint_markdown.yml(1) andintegration_test.yml(1). This stops the GitHub token being left in.git/config(Arnica artipacked findings). No later step needs git credentials: the Go jobs only runmake/go test, and the integration trigger script passes its token tocurlthrough env vars and does not use git.go-multierrorand its dependencyerrwrap, in the README Credits. They are used unmodified. MPL-2.0 is file-level (weak) copyleft, so it does not change the Apache-2.0 license of the SDK's own code, but the note also says that distributing a compiled binary that includes these packages requires making their source available (MPL-2.0 section 3.2). I kept them rather than replacinggo-multierrorwitherrors.Join, because that would change the error message format and type returned by the feature-variable APIs inclient.go.Not changed
pkg/cmab/service.go(Arnica "invalid usage of modified variable" finding): no code change.fetchDecisionreturns aDecisionvalue, not a pointer, so readingdecision.Reasonsin the error path cannot panic. This finding is a false positive.service.gofinding should be dismissed in Arnica with the reasons above.Test plan
go build ./...andgo test ./...passIssues
🤖 Generated with Claude Code