Repository navigation
fix(scripts): reject unknown --source in generate-federation-iac - #640
Merged
Merged
Conversation
populateData allowlisted --target but not --source, so --source Azure fell through awsOIDCIssuer's default arm and rendered oidc_issuer_url empty next to a populated subject claim. Add a validSources allowlist and a test mirroring the --target one.
Contributor
|
Warning Review limit reached
This review includes 2 billable files and costs up to $0.50.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 50 minutes for your next included review. View limit detailsLimit details: You’ve used the included review currently available. Your 69 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (2)
Comment |
With both flags wrong, --target must be reported. Checking --source first passed every existing test.
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.
Closes #303
Adds a
validSourcesallowlist checked right after--target(viavalidateCloudFlags, split out to keeppopulateDataunder the gocyclo limit).awsOIDCIssuer's default arm is left alone: after the allowlist its only reachable empty return is--source aws, where an empty issuer is correct (the cross-account external-ID artifact has no OIDC issuer). The--target aws --source awscase in the issue already selects the external-ID template on main.Checks: new
TestGenerator_InvalidSourceReportedAsSourcefails without the fix and passes with it;go test ./scripts/passes; gofmt and go vet clean.