Suggestion : we should add example against each control for better understanding for developers/security learner.
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 3.6k
- Forks
- 831
- Avg merge
- 7h 55m
- Merged PRs (30d)
- 4
Description
Suggestion
In my opinion, we should add links or include at least one code example in the control itself. I understand that it might be difficult to provide examples for every programming language, but we could use pseudocode or a general example instead.
For first control :
Code example
`def insecure(user_input):
#step 1 : Validate user input
if '..' in user_input:
Exception("Blocked")
#step 2 : Decode after validation (bad)!
decoded_input = decode_input(user_input)
open(decoded_input)
if I pass this input to insecure method %2e%2e%2fetc%2fpasswd, then it will pass the validation and after decoding the input become '../etc/passwd'
Boom : Path traversal occurs
I think by giving example we can make it easy. I am happy to volunteer and add example where ever possible.
Thanks
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the first control, 1.1.1, and review the requested pseudocode example and its path-traversal scenario. Define a consistent format and scope for adding examples or links across the controls. Done means the agreed controls contain understandable examples or links without requiring a specific programming language.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation, security
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100