dev-sec / dev-sec/linux-baseline
Add two additional PATH env checks for the rule 'os-04'
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Ruby
- Stars
- 875
- Forks
- 193
- Avg merge
- 9m
- Merged PRs (30d)
- 1
Description
Description
I suggest adding two checks for the rule 'os-04' for PATH environment variable:
- check that there are no spaces;
- check that there are no '..' (parent directory of the current one).
I guess it won't be superfluous.
Solution
Can be easily solved as:
...
its('split') { should_not include(' ') }
its('split') { should_not include('..') }
...
Contributor guide
No contributing guide indexed for this repository
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 by locating the os-04 PATH environment-variable check in the InSpec profile and inspect how its split values are currently tested. Add coverage for the two requested conditions and verify that the applicable profile checks pass with the expected PATH validation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- operating-systems, security
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100