Skip to content
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

Upgrade semgrep to latest version #135

Closed
academo opened this issue Sep 5, 2023 · 4 comments · Fixed by #142
Closed

Upgrade semgrep to latest version #135

academo opened this issue Sep 5, 2023 · 4 comments · Fixed by #142
Labels
enhancement New feature or request

Comments

@academo
Copy link
Member

academo commented Sep 5, 2023

In #133 we had to lock the semgrep version to 1.28 because the newer version (>=1.38) is not working as expected.

We should research what's not working in this new version and patch it so we can keep using the updated tool.

@academo academo added the enhancement New feature or request label Sep 5, 2023
@briangann
Copy link
Collaborator

briangann commented Oct 24, 2023

looks like drone is not using semgrep at all and skipping those tests

=== RUN   TestAccessEnvVariables
    coderules_test.go:24: semgrep not installed, skipping test
--- SKIP: TestAccessEnvVariables (0.00s)
=== RUN   TestAccessAllowedEnvVariables
    coderules_test.go:48: semgrep not installed, skipping test
--- SKIP: TestAccessAllowedEnvVariables (0.00s)
=== RUN   TestAccessFS
    coderules_test.go:73: semgrep not installed, skipping test
--- SKIP: TestAccessFS (0.00s)
=== RUN   TestUseSyscall
    coderules_test.go:98: semgrep not installed, skipping test
--- SKIP: TestUseSyscall (0.00s)

@academo
Copy link
Member Author

academo commented Nov 6, 2023

@briangann from which CI are these logs?

@briangann
Copy link
Collaborator

TestAccessEnvVariable

See https://drone.grafana.net/grafana/plugin-validator/194/1/2

Line 316 (expand all logs first)

@academo
Copy link
Member Author

academo commented Nov 8, 2023

@briangann I looked into it. that's expected. What drone does is build the Docker image (on main merge).

The docker image will have semgrep installed and the validator binary, to build the validator binary, the drone runner needs to run the tests which skip semgrep because the drone runner doesn't have it installed. That doesn't affect the final docker image that will have both the binary and semgrep.

nevertheless, the github action that runs on PRs and commits to main does install semgrep on the runner and validates it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants