-
Notifications
You must be signed in to change notification settings - Fork 4
feat: run plugin-validator as part of CI (opt-in) #366
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
Merged
+115
−2
Merged
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
09bc569
feat: run plugin-validator as part of CI (opt-in)
xnyo 2f4c431
removed unnecessary cd
xnyo cd1239d
pass configuration to plugin validator
xnyo b924345
Merge branch 'main' into giuseppe/validator
xnyo dc29f0a
shellcheck
xnyo cce6c6a
test gha annotations output
xnyo da228d3
exit plugin-validator step with plugin-validator container exit code
xnyo c2cde67
remove debug output
xnyo 11f56a6
pass source code uri to plugin-validator
xnyo bc95bc7
reportAll
xnyo 00622c9
disable clamav to speed up analysis
xnyo e0e0c07
enable debug mode
xnyo 5f69e9c
actionlint?
xnyo 7e98ab7
Merge branch 'main' into giuseppe/validator
xnyo e53c3df
add -ghaOutput flag to validator
xnyo b68ede2
add plugin-validator-config-file and plugin-validator-config-path inputs
xnyo dbd3a0b
actionlint
xnyo c11331c
add smoke test for plugin-validator
xnyo 32660f0
fix concurrency with simple-ci tests
xnyo becb972
pass only plugin directory to plugin validator when not ci is not run…
xnyo 236971b
test matrix for config file
xnyo a9d73c8
remove read only from config bind mount
xnyo 79b1c31
fix artifacts conflict
xnyo 500e85d
simplify smoke test
xnyo 5f114ed
add validator inputs to cd, reorganize ci inputs in cd workflow
xnyo 13f8672
reduce diff
xnyo 0bd8be3
do not mount node_modules
xnyo 1740f25
comments
xnyo c920981
Merge branch 'main' into giuseppe/validator
xnyo 6f309a0
rename plugin-validator-config-file input to plugin-validator-config
xnyo 31e91b8
remove warning when config file is missing, changed default config
xnyo 51859a2
adjust config inputs priority
xnyo d9dd736
check if config path is a directory
xnyo 9e0d956
remove redundant check
xnyo 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 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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -59,3 +59,5 @@ jobs: | |
|
|
||
| # TODO: enable in a follow-up PR | ||
| run-playwright: false | ||
|
|
||
| run-plugin-validator: true | ||
Oops, something went wrong.
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.
if we are not going to run clamav we might benefit from using npx directly which can be faster than pulling and running the whole docker image? just see if that might speed up things
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.
What about semgrep, osv-scanner and gosec? The readme specifies they should be installed:
https://github.com/grafana/plugin-validator?tab=readme-ov-file#security-tools
I am not sure about osv-scanner because it looks like it's being used as a library and it should work even if it's not installed on the system.
semgrep requires the executable: https://github.com/grafana/plugin-validator/blob/e985ef06cef56f260ed0af03fa08b94f495e952a/pkg/analysis/passes/coderules/coderules.go#L95
gosec too: https://github.com/grafana/plugin-validator/blob/e985ef06cef56f260ed0af03fa08b94f495e952a/pkg/analysis/passes/gosec/gosec.go#L43
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.
you are correct. semgrep and gosect require system install. osv-scanner uses the go library so works via npx