SSO-OIDC client example tokens trip secret scanners (Trivy jwt-token, gitleaks) — redact JWT-shaped values in the service model
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- aws, ruby
- Domain
- cloud, documentation
Research direction
Start with the canonical SSO-OIDC service model, examples-1.json, and inspect the id_token, assertion, and client_secret examples described in the issue. Verify the generated lib/aws-sdk-ssooidc/client.rb output and run the Trivy secret-scan reproduction; done means the examples remain useful placeholders without JWT-token findings.
Written by the indexing model from the issue text.
Description
Describe the feature
The generated Aws::SSOOIDC::Client documentation embeds realistic-looking JWTs in its @example blocks for create_token and create_token_with_iam. Because these are full eyJ…-shaped tokens rather than obvious placeholders, secret scanners flag them as leaked credentials when they scan an application's installed gems / built container image.
Concretely, scanning an image that bundles aws-sdk-core (3.251.0) with Trivy's secret scanner produces a false positive on lib/aws-sdk-ssooidc/client.rb via the built-in jwt-token rule. The same false positive is reproducible with gitleaks and other regex-based scanners, and the same example values appear in aws-sdk-js-v3 and botocore, so this affects downstream consumers across all AWS SDKs.
These are clearly intentional example values (account 123456789012, ssoins-111111111111, the Microsoft AbeLi@microsoft.com sample OIDC token, etc.), so this is a documentation-quality / false-positive-noise issue, not a leaked secret.
Affected examples
In aws-sdk-core 3.251.0, lib/aws-sdk-ssooidc/client.rb (generated from the SSO-OIDC examples-1.json model, API version 2019-06-10):
id_tokenin the example responses (thecreate_token_with_iamauthorization-code, JWT-bearer, and token-exchange grant examples)assertionin the JWT-bearer grant example requestclient_secretin thecreate_tokenexample requests (VERYLONGSECRETeyJ…)
Note the inconsistency: the neighboring access_token, refresh_token, and authorization code examples already end in explicit …EXAMPLEACCESSTOKEN / …EXAMPLEREFRESHTOKEN / …EXAMPLEAUTHCODE markers, but the JWT-shaped values do not, which is exactly why scanners single them out.
Proposed change
Redact the JWT-shaped example values in the canonical SSO-OIDC service model (examples-1.json) so they are unmistakably non-secret while still illustrating the field shape — for example a short, obviously-fake stub such as eyJhbGciOiJub25lIn0.eyJzdWIiOiJFWEFNUExFIn0.EXAMPLE or a <id-token>-style placeholder — matching the EXAMPLE… convention already used for the surrounding tokens. Because the SDK clients are generated from this shared model, fixing it upstream propagates to all SDKs.
Reproduction
trivy fs --scanners secret <path-to-bundled-gems>/aws-sdk-core-3.251.0
# or against an image that bundles the gem:
trivy image --scanners secret <image>
# -> JWT (jwt-token) finding on lib/aws-sdk-ssooidc/client.rb
Environment
aws-sdk-core3.251.0- Trivy 15.0.7 (
jwt-tokensecret rule); also reproducible with gitleaks
- Dominant language
- Ruby
- Stars
- 3.7k
- Forks
- 1.2k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 5
Contributor 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 aws/aws-sdk-ruby
-
feature-request needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
aws/aws-sdk-ruby#3423 ·
-
bug needs-triage
Difficulty 3/5 1-2 days Newbie friendliness 74/100
aws/aws-sdk-ruby#3419 ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 58/100
aws/aws-sdk-ruby#3393 · 1 comment ·
-
BedrockAgentCore: invoke_agent_runtime buffers entire response instead of streaming in real-time Opendocumentation
Difficulty 4/5 3-5 days Newbie friendliness 48/100
aws/aws-sdk-ruby#3348 · 6 comments · 1 reaction ·
-
cross-sdk feature-request
Difficulty 3/5 1-2 days Newbie friendliness 68/100
aws/aws-sdk-ruby#3313 · 5 comments ·
All issues in aws/aws-sdk-ruby
Similar issues
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
TheOdinProject/curriculum#31408 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
notch8/utk_knapsack#148 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Homebrew/homebrew-cask#288729 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100