Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions shellfirm/checks/fs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
filters:
- type: PathExists
value: 1
- type: NotContains
value: ">/dev/null"
- from: fs
test: chmod\s{1,}(?:\S+\s+)*(?:-[a-zA-Z]*R[a-zA-Z]*|--recursive)\s+(?:\S+\s+)*(\*|\.{1,}|/)
description: "Change permission to all root files can brake your some thinks like SSH keys."
Expand Down
12 changes: 12 additions & 0 deletions shellfirm/tests/checks/fs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,18 @@
- test: 'cat "test" >> file.txt'
description: "append redirect should not match (only single > triggers)"
expect_ids: []
- test: "which cargo-tauri 2>/dev/null"
description: "redirect stderr to /dev/null should not match"
expect_ids: []
- test: "npx tauri --version 2>/dev/null"
description: "redirect stderr to /dev/null should not match"
expect_ids: []
- test: "echo test >/dev/null"
description: "redirect stdout to /dev/null should not match"
expect_ids: []
- test: "command -v foo &>/dev/null"
description: "redirect all to /dev/null should not match"
expect_ids: []

# -- fs:gdisk_disk_modify --
- test: "gdisk /dev/sda"
Expand Down
Loading