Repository navigation
[FSSDK-13474] Fix Arnica findings: artipacked workflows, MD5 hash, test class false positive - #412
Merged
Esra Kartal (esrakartalOpt) merged 3 commits intoNov 20, 2026
Conversation
…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>
Raju Ahmed (raju-opti)
requested changes
Nov 20, 2026
…suppress Revert the SHA256 change per review. The hash only detects changed attribute values in the local CMAB cache and is computed on every CMAB evaluation, so a fast non-cryptographic hash is preferable. Add a comment and nosemgrep suppression explaining that it is not used for security. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Human validation is needed because the unavailable external trigger script’s credential requirements remain unverified, and passing PR integration runs use @master rather than the changed workflow.
No open issues 🎉
What changed in this PR
This PR addresses Arnica findings by disabling persisted checkout credentials and documenting two scanner suppressions. It also updates the Ruby CI matrix without changing SDK runtime behavior.
Changes:
- Disable credential persistence in the unit-test and integration workflows.
- Add explanatory comments and
nosemgrepsuppressions for the existing MD5 cache fingerprint and the plain Ruby test double. - Use Ruby series versions in CI and align the Ruby 3.0 RuboCop condition.
| File | Description |
|---|---|
spec/bucketing_holdout_spec.rb |
Documents and suppresses the Rails-specific false positive on TestBucketer. |
lib/optimizely/cmab/cmab_service.rb |
Explains the existing MD5 fingerprint use and adds a scanner suppression. |
.github/workflows/ruby.yml |
Disables persisted credentials and updates Ruby versions and the RuboCop condition. |
.github/workflows/integration_test.yml |
Disables persisted checkout credentials and documents the intended token usage. |
Review effort: Balanced
Contributor
Author
|
Following up on the Copilot review note about the two items that needed human validation:
|
Esra Kartal (esrakartalOpt)
deleted the
fssdk-13474-fix-arnica-findings
branch
November 20, 2026 19:52
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.
Summary
persist-credentials: falseto theactions/checkoutsteps 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.ymlonly runs bundler, rubocop, rspec and coveralls, and theintegration_test.ymltrigger script passes its token tocurlthrough env vars and does not use git.Digest::MD5inOptimizely::CmabService#hash_attributes(Arnica weak MD5 finding), but document it and add anosemgrepsuppression directly above the call. The hash is only a fast fingerprint for detecting changed attribute values in the local CMAB cache, computed on every CMAB evaluation. It is not used for security and never leaves the SDK, so a cryptographic hash is not needed (per review feedback from Raju Ahmed (@raju-opti)).nosemgrepcomment onTestBucketerinspec/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.3.0,3.1,3.2,3.3) in theruby.ymlCI matrix.ubuntu-latestis now Ubuntu 26.04, which only provides the latest patch of each Ruby series, so exact versions like3.1.0failed atsetup-ruby. The rubocop condition for Ruby 3.0 is updated to match. This was a pre-existing CI failure, not caused by the other changes.Arnica may need the MD5 and
TestBucketerfindings dismissed there with the reasons above if thenosemgrepcomments are not honored.Test plan
bundle exec rake spec: 1131 examples, 0 failuresbundle exec rubocop: no offensesunit_testson Ruby 3.0, 3.1, 3.2 and 3.3, plus the integration tests)Issues
🤖 Generated with Claude Code