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

RegExp validation error when running github/codeql-action/upload-sarif@main #1671

Closed
cahrens opened this issue May 5, 2023 · 1 comment · Fixed by #1672
Closed

RegExp validation error when running github/codeql-action/upload-sarif@main #1671

cahrens opened this issue May 5, 2023 · 1 comment · Fixed by #1672

Comments

@cahrens
Copy link

cahrens commented May 5, 2023

This morning I started seeing the error below in our repository (https://github.com/DataBiosphere/terra-billing-profile-manager/actions/runs/4896402407/jobs/8743164718). It happens on PRs that previously succeeded, as well as empty changes-- it is always reproducible. It seems to be caused by 11fba50

Uploading results
  Processing sarif files: ["service/build/reports/spotbugs/main.sarif"]
  Error: Invalid regular expression: /^(?i)[a-zA]{2}(-[a-z]{2})?$/: Invalid group
  SyntaxError: Invalid regular expression: /^(?i)[a-zA]{2}(-[a-z]{2})?$/: Invalid group
      at new RegExp (<anonymous>)
      at Validator.validatePattern (/home/runner/work/_actions/github/codeql-action/main/node_modules/jsonschema/lib/attribute.js:691:[14](https://github.com/DataBiosphere/terra-billing-profile-manager/actions/runs/4896402407/jobs/8743164718#step:8:15))
      at Validator.validateSchema (/home/runner/work/_actions/github/codeql-action/main/node_modules/jsonschema/lib/validator.js:208:34)
      at Validator.validateProperties (/home/runner/work/_actions/github/codeql-action/main/node_modules/jsonschema/lib/attribute.js:277:20)
      at Validator.validateSchema (/home/runner/work/_actions/github/codeql-action/main/node_modules/jsonschema/lib/validator.js:208:34)
      at Validator.validateSchema (/home/runner/work/_actions/github/codeql-action/main/node_modules/jsonschema/lib/validator.js:198:[17](https://github.com/DataBiosphere/terra-billing-profile-manager/actions/runs/4896402407/jobs/8743164718#step:8:18))
      at Validator.validateProperties (/home/runner/work/_actions/github/codeql-action/main/node_modules/jsonschema/lib/attribute.js:277:20)
      at Validator.validateSchema (/home/runner/work/_actions/github/codeql-action/main/node_modules/jsonschema/lib/validator.js:208:34)
      at Validator.validateSchema (/home/runner/work/_actions/github/codeql-action/main/node_modules/jsonschema/lib/validator.js:[19](https://github.com/DataBiosphere/terra-billing-profile-manager/actions/runs/4896402407/jobs/8743164718#step:8:20)8:17)
      at Validator.validateProperties (/home/runner/work/_actions/github/codeql-action/main/node_modules/jsonschema/lib/attribute.js:277:[20](https://github.com/DataBiosphere/terra-billing-profile-manager/actions/runs/4896402407/jobs/8743164718#step:8:21))

I then set the commit to the one before 11fba5, and the issue did not occur.

https://github.com/DataBiosphere/terra-billing-profile-manager/actions/runs/4896591494/jobs/8743584809?pr=207

Run github/codeql-action/upload-sarif@1e1aca816581927cd0a1d4ade4bed45cd6e86b2b
  with:
    sarif_file: service/build/reports/spotbugs/main.sarif
    checkout_path: /home/runner/work/terra-billing-profile-manager/terra-billing-profile-manager
    token: ***
    matrix: null
    wait-for-processing: true
  env:
    JAVA_HOME: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.6-10/x6[4](https://github.com/DataBiosphere/terra-billing-profile-manager/actions/runs/4896591494/jobs/8743584809?pr=207#step:8:4)
Uploading results
  Processing sarif files: ["service/build/reports/spotbugs/main.sarif"]
  Uploading results
  Successfully uploaded results
Waiting for processing to finish
  Analysis upload status is pending.
  Analysis upload status is complete.
@aeisenberg
Copy link
Contributor

Thanks for reporting. That indeed does seem related to a change we made this morning.

For now, please change github/codeql-action/init@main to @v2. Same for the analyze action. We'll put up a change for this shortly.

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 a pull request may close this issue.

2 participants