OWASP / OWASP/ASVS

Suggestion : we should add example against each control for better understanding for developers/security learner.

Open
#3,077 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

_5.0 - Not blocker enhancement
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 :

1.1.1 | Verify that input is decoded or unescaped into a canonical form only once, it is only decoded when encoded data in that form is expected, and that this is done before processing the input further, for example it is not performed after input validation or sanitization.
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.