-
Notifications
You must be signed in to change notification settings - Fork 511
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
✨ Add GitHub git compatibility mode #4474
base: main
Are you sure you want to change the base?
Conversation
This is primarily aimed at helping in cases where a repository's .gitattributes file causes files to not be analyzed. Signed-off-by: Spencer Schrock <[email protected]>
This will let us use the new entrypoint in a backwards compatible way, similar to the scorecard.Run change made in the v5 release. Signed-off-by: Spencer Schrock <[email protected]>
Signed-off-by: Spencer Schrock <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4474 +/- ##
==========================================
+ Coverage 66.80% 68.21% +1.40%
==========================================
Files 230 247 +17
Lines 16602 18605 +2003
==========================================
+ Hits 11091 12691 +1600
- Misses 4808 5072 +264
- Partials 703 842 +139 |
Thoughts on the CLI flag? It's not GitHub specific, and can be added for the GitLab client in a future PR
And then the Scorecard Action would have a corresponding input: - name: "Run analysis"
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
with:
results_file: results.sarif
results_format: sarif
publish_results: true
git_compatibility_mode: true or it could be a selection of options if we think we'll add a local file option (for a repo you already have cloned for example): - name: "Run analysis"
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
with:
results_file: results.sarif
results_format: sarif
publish_results: true
file_mode: git # one of [archive, git, local] EDIT: With a similar file mode flag, the CLI would be:
|
export-ignore is not a github specific feature, and other forges, like gitlab, suffer from the same bug. Signed-off-by: Spencer Schrock <[email protected]>
This will allow sharing with GitLab in a followup PR Signed-off-by: Spencer Schrock <[email protected]>
Signed-off-by: Spencer Schrock <[email protected]>
also moves a func around for smaller PR diff. Signed-off-by: Spencer Schrock <[email protected]>
Signed-off-by: Spencer Schrock <[email protected]>
/scdiff generate Binary-Artifacts,Dangerous-Workflow,Dependency-Update-Tool,Fuzzing,License,Packaging,Pinned-Dependencies,SAST,Security-Policy,Token-Permissions,Vulnerabilities |
I like a |
6d9d0c4
to
50be4b6
Compare
Signed-off-by: Spencer Schrock <[email protected]>
50be4b6
to
08a0b7a
Compare
What kind of change does this PR introduce?
feature
What is the current behavior?
All GitHub repo files are fetched using the export archive tarball
What is the new behavior (if this is a feature change)?**
export-ignore
).--git-mode
flagWithGitMode()
option when runningscorecard.Run
or creating a GitHub RepoClient, which can be done from Scorecard Action as well. How we expose that to users will be part of a different PR in that repository.Which issue(s) this PR fixes
Related to #2489
Special notes for your reviewer
Does this PR introduce a user-facing change?
For user-facing changes, please add a concise, human-readable release note to
the
release-note
(In particular, describe what changes users might need to make in their
application as a result of this pull request.)