Skip to content

@W-23895509 | Block secret values in Site preferences - #123

Merged
shauryemahajanSF merged 3 commits into
release/26.8from
W-23895509-site-preference-credentials-scan
Aug 18, 2026
Merged

shauryemahajanSF merged 3 commits into
release/26.8from
W-23895509-site-preference-credentials-scan

Conversation

@shauryemahajanSF

@shauryemahajanSF shauryemahajanSF commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add blocking S20 checks for secret values declared in password-typed Site preferences or read through literal getCustomPreferenceValue calls
  • parse Site preference metadata with xmllint and fail closed when the dependency is unavailable
  • update app-generation and validation guidance to prohibit secret values in Site preferences and require ecom service credentials for authentication secrets

Test plan

  • bash .github/scripts/test-security-scan.sh — 158 passed, 0 failed
  • bash -n .github/scripts/security-scan.sh .github/scripts/test-security-scan.sh
  • jq empty .claude/skills/generate-site-preferences-impex/evals/evals.json
  • git diff --check

Work item

  • W-23895509

@shauryemahajanSF
shauryemahajanSF requested review from a team August 17, 2026 19:24
@shauryemahajanSF shauryemahajanSF changed the title @W-23895509 | Block Site preference credentials in CAP scanner @W-23895509 | Block secret values in Site preferences Aug 17, 2026
@shauryemahajanSF
shauryemahajanSF force-pushed the W-23895509-site-preference-credentials-scan branch from 88dc642 to 68933f2 Compare August 17, 2026 19:50

@jbisaSF jbisaSF left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs/skill updates look good. A couple of gaps in the S20 check itself though. The libxml2-utils install only landed in test-scripts.yml, so the workflows that actually scan CAP zips still don't have xmllint. This PR's security job passed because no zips changed. Also, string-typed secret prefs (the old *ApiKey pattern) currently pass the XML check.

Comment thread .github/workflows/test-scripts.yml
Comment thread .github/scripts/security-scan.sh Outdated
Comment thread .github/scripts/security-scan.sh
…block string-typed & malformed secret prefs

- Install libxml2-utils in security.yml and verify-zip.yml (the workflows
  that actually scan CAP zips); previously only test-scripts.yml had it, so
  security-scan.sh would fail closed with "xmllint is required" or S20 would
  not run in the pipelines that matter.
- S20 now matches secret-like attribute IDs on SitePreferences regardless of
  declared <type>, catching string-typed secrets (e.g. vendorApiKey) that BM
  will not mask.
- S20 fails closed on malformed SitePreferences XML instead of silently
  skipping the file when xmllint cannot parse it.
- Add tests for string-typed secret prefs, non-secret string prefs, and
  malformed SitePreferences XML.

Co-Authored-By: Claude Opus 4.8 (1M context) <claude.noreply@salesforce.com>

@jbisaSF jbisaSF left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scanner follow-up looks good. One leftover in the rule list.

Comment thread .claude/skills/shared/security-rules.md Outdated
jbisaSF
jbisaSF previously approved these changes Aug 18, 2026
The security-rules.md entry still described S20 as detecting only
password-typed Site preferences. The scanner now flags secret-like
SitePreferences attribute IDs regardless of declared type and fails
closed on malformed SitePreferences XML. Update the rule list to match.

Co-Authored-By: Claude Opus 4.8 (1M context) <claude.noreply@salesforce.com>
@shauryemahajanSF
shauryemahajanSF merged commit 4e5fad6 into release/26.8 Aug 18, 2026
2 of 3 checks passed
@shauryemahajanSF
shauryemahajanSF deleted the W-23895509-site-preference-credentials-scan branch August 18, 2026 18:54
shauryemahajanSF added a commit that referenced this pull request Aug 18, 2026
Backstop against a wedged ubuntu-latest runner hanging up to the 6h
default (as happened on an apt-get step in PR #123). Job-level cap
covers all steps, current and future, with no per-step maintenance.

Co-authored-by: Claude Opus 4.8 (1M context) <claude.noreply@salesforce.com>
Co-authored-by: jbisaSF <jbisa@salesforce.com>
shauryemahajanSF added a commit that referenced this pull request Aug 18, 2026
Backstop against a wedged ubuntu-latest runner hanging up to the 6h
default (as happened on an apt-get step in PR #123). Job-level cap
covers all steps, current and future, with no per-step maintenance.

Co-authored-by: Claude Opus 4.8 (1M context) <claude.noreply@salesforce.com>
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.

2 participants