mirror of
				https://github.com/optim-enterprises-bv/secureblue.git
				synced 2025-11-04 04:18:01 +00:00 
			
		
		
		
	chore: switch to bluebuild's justfile module with validation (#556)
This commit is contained in:
		@@ -39,7 +39,7 @@ ujust enroll-secure-boot-key
 | 
				
			|||||||
## Set hardened kargs
 | 
					## Set hardened kargs
 | 
				
			||||||
 | 
					
 | 
				
			||||||
> [!NOTE]
 | 
					> [!NOTE]
 | 
				
			||||||
> Learn about the hardening applied by the kargs set by the command below [here](/files/system/usr/share/ublue-os/just/70-secureblue.just.readme.md).
 | 
					> Learn about the hardening applied by the kargs set by the command below [here](KARGS.md).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
ujust set-kargs-hardening
 | 
					ujust set-kargs-hardening
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -37,7 +37,7 @@ The following are not in scope:
 | 
				
			|||||||
- Adds per-network MAC randomization
 | 
					- Adds per-network MAC randomization
 | 
				
			||||||
- Blacklisting numerous unused kernel modules to reduce attack surface <sup>[details](https://github.com/secureblue/secureblue/blob/live/files/system/etc/modprobe.d/blacklist.conf)</sup>
 | 
					- Blacklisting numerous unused kernel modules to reduce attack surface <sup>[details](https://github.com/secureblue/secureblue/blob/live/files/system/etc/modprobe.d/blacklist.conf)</sup>
 | 
				
			||||||
- Enabling only the [flathub-verified](https://flathub.org/apps/collection/verified/1) remote by default
 | 
					- Enabling only the [flathub-verified](https://flathub.org/apps/collection/verified/1) remote by default
 | 
				
			||||||
- Sets numerous hardening kernel arguments (Inspired by [Madaidan's Hardening Guide](https://madaidans-insecurities.github.io/guides/linux-hardening.html)) <sup>[details](https://github.com/secureblue/secureblue/blob/live/files/system/usr/share/ublue-os/just/70-secureblue.just.readme.md)</sup>
 | 
					- Sets numerous hardening kernel arguments (Inspired by [Madaidan's Hardening Guide](https://madaidans-insecurities.github.io/guides/linux-hardening.html)) <sup>[details](KARGS.md)</sup>
 | 
				
			||||||
- Reduce the sudo timeout to 1 minute
 | 
					- Reduce the sudo timeout to 1 minute
 | 
				
			||||||
- Require wheel user authentication via polkit for `rpm-ostree install` <sup>[why?](https://github.com/rohanssrao/silverblue-privesc)
 | 
					- Require wheel user authentication via polkit for `rpm-ostree install` <sup>[why?](https://github.com/rohanssrao/silverblue-privesc)
 | 
				
			||||||
- Brute force protection by locking user accounts for 24 hours after 50 failed login attempts, hardened password encryption and password quality suggestions
 | 
					- Brute force protection by locking user accounts for 24 hours after 50 failed login attempts, hardened password encryption and password quality suggestions
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -173,7 +173,6 @@ override-reset-module mod_name:
 | 
				
			|||||||
      echo "No override found for $MOD_NAME module."
 | 
					      echo "No override found for $MOD_NAME module."
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
# Setup USBGuard
 | 
					# Setup USBGuard
 | 
				
			||||||
setup-usbguard:
 | 
					setup-usbguard:
 | 
				
			||||||
    #!/usr/bin/bash
 | 
					    #!/usr/bin/bash
 | 
				
			||||||
@@ -193,7 +192,6 @@ setup-usbguard:
 | 
				
			|||||||
rerun-yafti:
 | 
					rerun-yafti:
 | 
				
			||||||
    yafti -f /usr/share/ublue-os/firstboot/yafti.yml
 | 
					    yafti -f /usr/share/ublue-os/firstboot/yafti.yml
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
# Toggle anticheat support by changing ptrace scope (requires restart)
 | 
					# Toggle anticheat support by changing ptrace scope (requires restart)
 | 
				
			||||||
toggle-anticheat-support:
 | 
					toggle-anticheat-support:
 | 
				
			||||||
    #!/usr/bin/pkexec /usr/bin/bash
 | 
					    #!/usr/bin/pkexec /usr/bin/bash
 | 
				
			||||||
@@ -495,7 +493,6 @@ audit-secureblue:
 | 
				
			|||||||
        print_status "$USBGUARD_TEST_STRING" "$STATUS_FAILURE"
 | 
					        print_status "$USBGUARD_TEST_STRING" "$STATUS_FAILURE"
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
    CHRONYD_TEST_STRING="Ensuring chronyd is active"
 | 
					    CHRONYD_TEST_STRING="Ensuring chronyd is active"
 | 
				
			||||||
    if systemctl is-active --quiet chronyd; then
 | 
					    if systemctl is-active --quiet chronyd; then
 | 
				
			||||||
        print_status "$CHRONYD_TEST_STRING" "$STATUS_SUCCESS"
 | 
					        print_status "$CHRONYD_TEST_STRING" "$STATUS_SUCCESS"
 | 
				
			||||||
@@ -671,4 +668,3 @@ audit-secureblue:
 | 
				
			|||||||
            done
 | 
					            done
 | 
				
			||||||
        done
 | 
					        done
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
 | 
					 | 
				
			||||||
@@ -1,10 +0,0 @@
 | 
				
			|||||||
#!/usr/bin/env bash
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Tell build process to exit if there are any errors.
 | 
					 | 
				
			||||||
set -oue pipefail
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
brewimport='import "/usr/share/ublue-os/just/50-brew.just"'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
if ! grep -qF "$brewimport" /usr/share/ublue-os/justfile; then
 | 
					 | 
				
			||||||
    echo "$brewimport" >> /usr/share/ublue-os/justfile
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
@@ -1,9 +0,0 @@
 | 
				
			|||||||
#!/usr/bin/env bash
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Tell this script to exit if there are any errors.
 | 
					 | 
				
			||||||
# You should have this in every custom script, to ensure that your completed
 | 
					 | 
				
			||||||
# builds actually ran successfully without any errors!
 | 
					 | 
				
			||||||
set -oue pipefail
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# add our just config
 | 
					 | 
				
			||||||
echo 'import "/usr/share/ublue-os/just/70-secureblue.just"' >> /usr/share/ublue-os/justfile
 | 
					 | 
				
			||||||
@@ -1,4 +1,6 @@
 | 
				
			|||||||
modules:
 | 
					modules:
 | 
				
			||||||
 | 
					    - type: justfiles
 | 
				
			||||||
 | 
					      validate: true
 | 
				
			||||||
    - type: script
 | 
					    - type: script
 | 
				
			||||||
      scripts:
 | 
					      scripts:
 | 
				
			||||||
        - createautostartdir.sh
 | 
					        - createautostartdir.sh
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,6 +7,4 @@ scripts:
 | 
				
			|||||||
  - createmissingdirectories.sh
 | 
					  - createmissingdirectories.sh
 | 
				
			||||||
  - removesuid.sh
 | 
					  - removesuid.sh
 | 
				
			||||||
  - disablegeoclue.sh
 | 
					  - disablegeoclue.sh
 | 
				
			||||||
  - addjustconfig.sh
 | 
					 | 
				
			||||||
  - addbrewjustimport.sh
 | 
					 | 
				
			||||||
  - hardencontainerpolicy.sh
 | 
					  - hardencontainerpolicy.sh
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user