GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Breaking change in SARIF · Issue #1703 · github/codeql-action

Breaking change in SARIF #1703

New issue
Copy link
New issue
Copy link
Closed
Closed
Breaking change in SARIF#1703
Copy link

Description

@laurentsimon
laurentsimon
opened on May 25, 2023
Issue body actions

Hi, this commit #1668 seems to be a breaking change and was not versioned.

The scorecard project has an Action that is now completely broken since yesterday, see an example on this project https://github.com/google/osv.dev/actions/runs/5075329151/jobs/9116430536.

Is there a way to revert this change and put it behind a semver versioning?

/cc @josepalafox

Activity

  1. aeisenberg commented on May 25, 2023

    @aeisenberg
    aeisenberg
    on May 25, 2023
    Contributor
    More actions

    Thanks for letting us know. While we are investigating this, I recommend that you fix the version of the upload-artifact action to @v2.3.3 or @29b1f65.

  2. laurentsimon commented on May 25, 2023

    @laurentsimon
    laurentsimon
    on May 25, 2023
    Author
    More actions

    Thanks for the reply. It's hard for us to ask the 4.4k users to make this change, and not accept dependabot PRs after such change.

    I'll dig in the restrictions imposed on the new format. Thanks for looking into the problem!

    Reacted by Andrew Eisenberg and arie-git
  3. laurentsimon commented on May 25, 2023

    @laurentsimon
    laurentsimon
    on May 25, 2023
    Author
    More actions

    Btw, some context why we generate these invalid URIs. We found out during testing that SARIF results that don't contain a URI are not populated. Scorecard generates results about the absence of file, e.g. the lack of security policy files SECURITY.md.

    The current implementation looks like the following screenshot in the scanning dashboard (uri = "no file associated with this alert", line is set to 1 by default because I recall this was also necessary):
    image

  4. aeisenberg commented on May 25, 2023

    @aeisenberg
    aeisenberg
    on May 25, 2023
    Contributor
    More actions

    After some discussion, we've decided that the best approach is to retain this newer sarif schema and after validating, drop any errors related to invalid uri-references.

    Some more history on the change: the sarif schema we were using had a bug in some of the regexes that made them crash on certain inputs. The official sarif schema had already fixed these errors (without releasing a new version of the schema). Unfortunately, when we started using this new version, validating using the jsonschema package started failing because of a change to the uniqueItems key. The jsonschema version was updated to fix this. This new version of jsonschema now uses stricter parsing of uri-references. This is the bug you are seeing.

    Reacted by Aditya Sharad
  5. adityasharad commented on May 25, 2023

    @adityasharad
    adityasharad
    on May 25, 2023
    Contributor
    More actions

    We'd love to work together to find you a better alternative for creating scorecard alerts without having to create fake URIs that don't satisfy the SARIF spec. That will not block the solution @aeisenberg describes above, but we'll discuss internally and reach out to you with some long-term suggestions. (One immediate suggestion could be attaching the alert to a file that you know exists in the repo, for example the workflow file running the scorecard action.)

    Reacted by laurentsimon
  6. laurentsimon commented on May 25, 2023

    @laurentsimon
    laurentsimon
    on May 25, 2023
    Author
    More actions

    Thank you for the prompt reply. Seems like avoiding space character in the URI "fixes" the problem. But I'd like to fix it the right way with your help. Please let me know.

    Thank you so much!

  7. marcellmueller commented on May 25, 2023

    @marcellmueller
    marcellmueller
    on May 25, 2023
    More actions

    Thanks for getting this fixed so fast, our CI is working again!

    Reacted by Mark Feldhousen and laurentsimon
  8. aeisenberg commented on May 25, 2023

    @aeisenberg
    aeisenberg
    on May 25, 2023
    Contributor
    More actions

    Thanks for confirming the fix.

  9. aeisenberg
    closed this as completedon May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.