Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: verify-token allow empty base_ref #2475

Merged
merged 1 commit into from
Jul 26, 2023

Conversation

laurentsimon
Copy link
Collaborator

#2471 added the base_ref in verify-token but this value may be empty.

This PR allows the base_ref to be empty string.

Signed-off-by: laurentsimon <laurentsimon@google.com>
@laurentsimon laurentsimon changed the title fix: verify-token base_ref empty fix: verify-token allow empty base_ref Jul 26, 2023
* @throws Error - if actual and expected don't match or are empty.
*/
function validateField(name, actual, expected) {
function validateField(name, actual, expected, allow_empty = false) {
Copy link
Member

Choose a reason for hiding this comment

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

We could also separate into validateValue and validateNonEmpty.

@ianlewis ianlewis merged commit bb63553 into slsa-framework:main Jul 26, 2023
75 checks passed
enteraga6 pushed a commit to enteraga6/slsa-github-generator that referenced this pull request Aug 8, 2023
slsa-framework#2471 added
the base_ref in verify-token but this value may be empty.

This PR allows the base_ref to be empty string.

Signed-off-by: laurentsimon <laurentsimon@google.com>
Signed-off-by: Noah Elzner <elzner@google.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.

3 participants