Skip to content

[FSSDK-13474] Fix Arnica findings: artipacked workflows, MD5 hash, test class false positive - #412

Open
Esra Kartal (esrakartalOpt) wants to merge 2 commits into
masterfrom
fssdk-13474-fix-arnica-findings
Open

Esra Kartal (esrakartalOpt) wants to merge 2 commits into
masterfrom
fssdk-13474-fix-arnica-findings

Conversation

@esrakartalOpt

@esrakartalOpt Esra Kartal (esrakartalOpt) commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add persist-credentials: false to the actions/checkout steps in .github/workflows/ruby.yml (line 30) and .github/workflows/integration_test.yml (line 18), so the GitHub token is not left in .git/config (Arnica artipacked findings). No later step needs git credentials: ruby.yml only runs bundler, rubocop, rspec and coveralls, and the integration_test.yml trigger script passes its token to curl through env vars and does not use git.
  • Replace Digest::MD5 with Digest::SHA256 in Optimizely::CmabService#hash_attributes (Arnica weak MD5 finding). The hash is only a local fingerprint used to check that cached CMAB attributes still match. It is never sent to the CMAB API or shared with other SDKs. After upgrading, an existing cached entry will simply mismatch once and trigger one fresh fetch.
  • Add a nosemgrep comment on TestBucketer in spec/bucketing_holdout_spec.rb. The attr_accessible rule is for Rails models, and this is a plain test double, so the finding is a false positive. Arnica may need the finding dismissed with that reason if the comment is not honored.

Test plan

  • bundle exec rake spec: 1131 examples, 0 failures
  • bundle exec rubocop: no offenses
  • Both workflow files parse as valid YAML
  • The existing CMAB specs (spec/cmab) pass with the new hash

Issues

🤖 Generated with Claude Code

…st class false positive

- Add persist-credentials: false to the actions/checkout steps in ruby.yml and
  integration_test.yml so the GitHub token is not left in .git/config.
- Use SHA256 instead of MD5 for the CMAB attributes cache fingerprint.
- Add a nosemgrep comment on the TestBucketer test class (not a Rails model).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ubuntu-latest is now Ubuntu 26.04, which only provides the latest patch of
each Ruby series, so exact versions like 3.1.0 fail in setup-ruby. Use 3.0,
3.1, 3.2 and 3.3 so the latest patch is always selected, and update the
rubocop condition for Ruby 3.0 to match.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant