aquasecurity / aquasecurity/linux-bench
[FAIL] 1.1.2.a Ensure /tmp is configured
- Dominant language
- Go
- Stars
- 188
- Forks
- 65
- PR merge metrics
- No merged PRs in 30d
Description
Even having the remediation implemented, we still get check failed :
./linux-bench --check="1.1.2.a,1.1.2.b"
[INFO] 1 Initial Setup
[INFO] 1.1 Filesystem Configuration
[FAIL] 1.1.2.a Ensure /tmp is configured
[FAIL] 1.1.2.b Ensure /tmp is configured
== Remediations ==
1.1.2.a Configure /etc/fstab as appropriate.
example:
tmpfs /tmp tmpfs defaults,rw,nosuid,nodev,noexec,relatime 0 0
OR
Run the following commands to enable systemd /tmp mounting:
systemctl unmask tmp.mount systemctl enable tmp.mount
Edit /etc/systemd/system/local-fs.target.wants/tmp.mount to configure the /tmp mount:
[Mount]
What=tmpfs
Where=/tmp
Type=tmpfs
Options=mode=1777,strictatime,noexec,nodev,nosuid
1.1.2.b Configure /etc/fstab as appropriate.
example:
tmpfs /tmp tmpfs defaults,rw,nosuid,nodev,noexec,relatime 0 0
OR
Run the following commands to enable systemd /tmp mounting:
systemctl unmask tmp.mount systemctl enable tmp.mount
Edit /etc/systemd/system/local-fs.target.wants/tmp.mount to configure the /tmp mount:
[Mount]
What=tmpfs
Where=/tmp
Type=tmpfs
Options=mode=1777,strictatime,noexec,nodev,nosuid
# grep tmpfs /etc/fstab
tmpfs /tmp tmpfs defaults,rw,nosuid,nodev,noexec,relatime 0 0
# mount -v
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noexec,relatime)
Contributor guide
Research direction
Run ./linux-bench --check="1.1.2.a,1.1.2.b" and inspect the checks for 1.1.2.a and 1.1.2.b, using the /etc/fstab and systemd tmp.mount examples in the issue as the expected configurations. Verify the implementation recognizes the shown tmpfs mount and that both checks pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- operating-systems, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100