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

Scan kics with Gosec in build #1832

Closed
miguelfreitas93 opened this issue Jan 22, 2021 · 5 comments · Fixed by #1835
Closed

Scan kics with Gosec in build #1832

miguelfreitas93 opened this issue Jan 22, 2021 · 5 comments · Fixed by #1835
Assignees
Labels
feature request Community: new feature request

Comments

@miguelfreitas93
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Improve security of kics source code

Describe the solution you'd like
Add a step to perform Gosec scan in the build pipeline to get better secure code
https://github.com/securego/gosec

@miguelfreitas93 miguelfreitas93 added the feature request Community: new feature request label Jan 22, 2021
@ruigomescx ruigomescx added this to the Internal CI/CD milestone Jan 22, 2021
@ruigomescx
Copy link
Collaborator

Thanks for the suggestion @miguelfreitas93!

@rogeriopeixotocx rogeriopeixotocx self-assigned this Jan 22, 2021
rogeriopeixotocx added a commit that referenced this issue Jan 22, 2021
Signed-off-by: Rogério Peixoto <rogerio.peixoto@checkmarx.com>
@rogeriopeixotocx
Copy link
Contributor

Issue opened by @felipe-avelar got solved and the PR merged but since then they haven't released a new version yet so we can't move this forward unless we build gosec and run it without using the GH action securego/gosec#565

@miguelfreitas93
Copy link
Contributor Author

miguelfreitas93 commented Feb 19, 2021

@rogeriopeixotocx you can run an action of a specific commit or version or branch:
https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
steps:

  # Reference a specific commit
  - uses: actions/setup-node@c46424eee26de4078d34105d3de3cc4992202b1e
  # Reference the major version of a release
  - uses: actions/setup-node@v1
  # Reference a minor version of a release
  - uses: actions/setup-node@v1.2
  # Reference a branch
  - uses: actions/setup-node@main

For the moment we can use a specific branch, but once it is released you can change it to a specific version

@rogeriopeixotocx
Copy link
Contributor

rogeriopeixotocx commented Feb 19, 2021

@miguelfreitas93 Yes, that's true.. the issue is that their GH action uses the latest docker image published and they only publish a docker image whenever there's a new release. So we're stuck the same unless we check out the project, build it, and run the binary.. which is not very difficult but we're short on time, feel free to contribute if you can. Checkout this PR branch #1835 and you can follow our unit test build steps as guidance. Examples for setup and go modules vendor's download and build

@rogeriopeixotocx
Copy link
Contributor

rogeriopeixotocx commented Feb 19, 2021

@miguelfreitas93 better yet check their dockerfile and makefile for instructions on how to build it

ruigomescx pushed a commit that referenced this issue Mar 5, 2021
* sanitizing filepath to solve path traversal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Community: new feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants