Add output file support - #111
Draft
joshka wants to merge 1 commit into
Draft
Conversation
Author
|
Example failing output https://github.com/joshka/cargo-deny-action/security/code-scanning/1 |
Author
|
PR example of seeing the output directly as a comment in the PR: joshka#3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This adds a generic
output-fileinput for writingcargo-denystdout to a file, and exposes that path as an action output.This is intentionally narrower than the SARIF/GitHub Code Scanning idea from #110. It does not add upload behavior or any GitHub-specific SARIF handling; it only makes existing machine-readable stdout output easier to compose in workflows.
If this still feels like too much surface area for this action, I’m fine with closing it. I wanted to put up the smallest concrete version so the tradeoff is easier to evaluate.
Validation
I manually ran:
docker build -t test-cargo-deny .listandcheckDocker invocations with the new empty positional argumentoutput-filegeneration withGITHUB_OUTPUTset, including an assertion foroutput-file=/output/licenses.txt"version": "2.1.0"joshka/cargo-deny-action@joshka/output-filecovering SARIF upload and a cargo-deny failure that still writesoutput-file: https://github.com/joshka/cargo-deny-action/actions/runs/27341236898refs/pull/1/merge: Test output-file action PR behavior joshka/cargo-deny-action#1git diff --checkAI generated the first pass of this change, and I manually reviewed and validated the behavior above.