Skip to content

🐛 "SARIF URI scheme \"https\" did not match the checkout URI scheme \"file\",", #754

Open
@laurentsimon

Description

@laurentsimon

I'm developing a GitHub action following
https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning#physicallocation-object

The doc says the artifactLocation.uri: If the URI is absolute, code scanning can use the URI to checkout the artifact and match up files in the repository. For example, https://github.com/ghost/example/blob/00/src/promiseUtils.js

When I use a URL though, the analysis keeps failing Analysis processing failed.

I ran curl -u laurentimon:$GITHUB_AUTH_TOKEN -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/laurentsimon/scorecard-action-test/code-scanning/analyses and got the error message below:

"error": "SARIF URI scheme \"https\" did not match the checkout URI scheme \"file\",",

which seems to indicate https is not supported... but the doc says it is.

So my first question is: are URLs supported? I'm using them in SARIF's relatedLocation.physicalLocation.URI. If they are, what am I doing wrong?

My second question: I'd like to report related locations with urls, e.g. https://api.github.com/repos/ossf/scorecard/releases/assets/41580436, https://github.com/ossf/scorecard/releases/download/v2.1.1/scorecard_2.1.1_checksums.txt.sig. Urls may have different content types, so it's not entirely clear whether I'd need to use StartLine, CharOffset or ByteOffset depending on the content type. Ideally, ByteOffset should work regardless of content type.

Can you advise?

Thanks!

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