forked from rodjek/puppet-lint
-
Notifications
You must be signed in to change notification settings - Fork 13
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 SARIF support #40
Merged
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
60e3ac2
add SARIF support
shaopeng-gh 283382b
pretty print the whole json at the end
shaopeng-gh 8627248
SARIF base path uri should end with `/`
shaopeng-gh 8d15b84
Use better sample data in SARIF template
shaopeng-gh b2e0dce
Add help_uri and description to SARIF output
shaopeng-gh 40cfdd4
update example values in sarif template
shaopeng-gh d916b98
test workflow
shaopeng-gh db93036
test puppet-lint-action
shaopeng-gh 6e42257
test workflow
shaopeng-gh f9555df
test
shaopeng-gh 40c367a
test path
shaopeng-gh 99c91a3
continue-on-error: true
shaopeng-gh 8af4705
use .
shaopeng-gh 427333f
change order
shaopeng-gh 369fadd
Revert "change order"
shaopeng-gh 36e1fbd
change order
shaopeng-gh 747505a
remove warning lines
shaopeng-gh d145c7f
clean up
shaopeng-gh 0123103
use STDERR.put for warnings
shaopeng-gh ef1b694
Merge branch 'master' of https://github.com/shaopeng-gh/puppet-lint
shaopeng-gh 16d625d
remove clean step
shaopeng-gh 7fcf324
new line
shaopeng-gh 1b2da02
fix test with stderr
shaopeng-gh 01f8bd8
use Pathname.new
shaopeng-gh 17ad7a8
use delete_if
shaopeng-gh 119f16f
Fix comments
shaopeng-gh 57c7af8
remove not needed strategy matrix
shaopeng-gh 7232414
remove not needed strategy matrix
shaopeng-gh 74b39e6
fix rule index
shaopeng-gh 9d91452
upgrade to use upload-sarif@v2 instead of upload-sarif@v1
shaopeng-gh eca7fe0
removed example scan.yml
shaopeng-gh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{ | ||
"$schema":"https://www.schemastore.org/schemas/json/sarif-2.1.0-rtm.5.json", | ||
"version":"2.1.0", | ||
"runs":[ | ||
{ | ||
"tool":{ | ||
"driver":{ | ||
"name":"Puppet Lint", | ||
"informationUri":"https://github.com/puppetlabs/puppet-lint", | ||
"version":"0.15.0", | ||
"rules":[ | ||
{ | ||
"id":"", | ||
"name":"", | ||
"shortDescription":{ | ||
"text":"" | ||
}, | ||
"fullDescription":{ | ||
"text":"" | ||
}, | ||
"help":{ | ||
"text":"" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"results":[ | ||
{ | ||
"ruleId":"", | ||
"ruleIndex":0, | ||
"level":"error", | ||
"message":{ | ||
"text":"" | ||
}, | ||
"locations":[ | ||
{ | ||
"physicalLocation":{ | ||
"artifactLocation":{ | ||
"uri":"file:///foo.txt", | ||
"uriBaseId":"ROOTPATH" | ||
}, | ||
"region":{ | ||
"startLine":1, | ||
"startColumn":1 | ||
} | ||
} | ||
} | ||
] | ||
} | ||
], | ||
"columnKind":"utf16CodeUnits", | ||
"originalUriBaseIds":{ | ||
"ROOTPATH":{ | ||
"uri":"/" | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could affect usage via Rake. I don't know if people do this, but there are effectively 2 entry points: the bin file which you already found and Rake:
https://github.com/puppetlabs/puppet-lint/blob/020143b705b023946739eb44e7c7d99fcd087527/lib/puppet-lint/tasks/puppet-lint.rb#L88-L107=
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for all the inputs! I will set the PR as draft for now and look into them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have followed this instruction:
https://github.com/puppetlabs/puppet-lint/blob/master/README.md#testing-with-puppet-lint-as-a-rake-task
then running
rake lint
seems not having issue and output result normally.I think running in rake currently only have normal
output does not support json option in the configuration, so the line highlighted will not be run in rake lint command, so should be good.