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

remove gosec exampt #1616

Merged
merged 7 commits into from
Feb 2, 2024
Merged

remove gosec exampt #1616

merged 7 commits into from
Feb 2, 2024

Conversation

Issacwww
Copy link
Member

@Issacwww Issacwww commented Feb 2, 2024

Issue #, if available:

Description of changes:
Suggested by AppSec to remove the exempt from the CI action.
For G101,use annotation for it to ignore
For G103, use -exclude-generated as it comes from generated file.

For G204, replace exec.Command("ctr") in #1617, and replace exec.Command("getent") by net

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Testing Done
gosec -exclude-generated ./... and no issue reported
Add one more e2e test and compare the outpost case behavior has not change

See this guide for recommended testing for PRs. Some tests may not apply. Completing tests and providing additional validation steps are not required, but it is recommended and may reduce review time and time to merge.

@@ -20,7 +20,7 @@ jobs:
with:
go-version: '1.21.6'
- run: go install github.com/securego/gosec/v2/cmd/gosec@latest
- run: gosec -exclude=G101,G103,G204 ./...
- run: gosec -exclude-generated ./...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@Issacwww Issacwww changed the title use annotation to ignore gosec rule remove gosec exampt Feb 2, 2024
Copy link
Member

@ndbaker1 ndbaker1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Issacwww Issacwww merged commit 62ca82a into awslabs:al2023 Feb 2, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants