add config-secrets option to allow-list secrets in workflows#649
Conversation
Introduces a new `config-secrets` configuration option in `actionlint.yaml`, parallel to the existing `config-variables` option. When set to an array of secret names, actionlint will report any `secrets.XXXX` access where XXXX is not in the list. The default value `null` disables the check; an empty array disallows all secrets. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Since this change seems to be generated by Claude, let me ask a question. Did you review the generated code, confirmed the test results, and validated the behavior with actual config files? |
| n.Property, | ||
| ) | ||
| return | ||
| } |
There was a problem hiding this comment.
I don't think this fast path is necessary because the below error message is comprehensive enough.
There was a problem hiding this comment.
Do you think we should also remove the same fast path from checkConfigVariables just above?
There was a problem hiding this comment.
@rhysd do you have any opinion whether I should handle checkConfigVariables at the same time?
Hello, that's a very good, while I didn't know anything about go and not much about this project's internal, what I did review myself was:
Overall, I did think opening a PR was a good way to get the conversation started about #609 |
Fixes #609
I did use claude-code to open this because I'm not familiar at all with go. I tried to review the changes as best I could but apologize in advance if this is not good enough.
Summary
config-secretsconfiguration option inactionlint.yaml, parallel to the existingconfig-variablesoptionsecrets.XXXXaccess where XXXX is not in the list (case-insensitive)nulldisables the check; an empty array disallows all secretsdocs/config.mdwith documentation and usage exampleTest plan
testdata/projects/config_secrets/TestExprSemanticsCheckOKforsecret,known secret, andsecret name is case insensitiveTestExprSemanticsCheckErrorforno secret is allowedandunknown secretgo test ./...)staticcheck ./...passes cleanly