fix: restrict file permissions and document CLI path usage (CWE-276,22) - #556
Merged
Harsh4902 merged 2 commits intoSep 29, 2026
Merged
Conversation
Signed-off-by: Vaishnav88sk <vaishnavsk8804@gmail.com>
…hs (G304, G703) Signed-off-by: Vaishnav88sk <vaishnavsk8804@gmail.com>
Vaishnav88sk
requested review from
Harsh4902,
lbroudoux and
yada
as code owners
September 29, 2026 07:52
|
You are now a Microcks community contributor! 💖 Thanks and congrats 🚀 on merging your first pull request! We are delighted and very proud of you! 👏 📢 If you're using Microcks in your organization, please add your company name to this list. 🙏 It really helps the project to gain momentum and credibility. It's a small contribution back to the project with a big impact. If you need to know why and how to add yourself to the list, please read the blog post "Join the Microcks Adopters list and Empower the vibrant open source Community 🙌" Kudos and please keep going, we need you 🙌 |
This branch was successfully deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR addresses several file-related security warnings identified by the
gosecSAST scanner.Security Fixes (CWE-276):
os.ModePerm/0644). This has been restricted to0750for directories and0600for files so that only the owner has access.False Positive Suppressions (CWE-22):
os.ReadFileandos.Open. Because this is a local CLI tool, the user intentionally provides these paths (e.g., via CLI flags) or they are sourced from trusted system variables (e.g.,GITHUB_OUTPUT). These have been annotated with#nosecto suppress the warnings and document the design choice.How to test
gosec -include=G301,G302,G304,G703 ./...and verify 0 issues are found.rwxr-x---(0750) permissions.