Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
feat: apply patches to harden system (part 2)
Browse files Browse the repository at this point in the history
* feat: require a password for sudo every time it's called

* feat: add hardened chromium config

Everything was taken from here: https://github.com/secureblue/secureblue
  • Loading branch information
c0deplayer committed Jan 27, 2024
1 parent 3ae25f6 commit f7e5e7c
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/common_modules/scripts.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
type: script
scripts:
- file-permissions.sh
- system76-scheduler.sh
- brave-browser.sh
- systemwide-themes.sh
Expand Down
3 changes: 3 additions & 0 deletions config/files/usr/etc/chromium/chromium.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# system wide chromium flags
CHROMIUM_FLAGS=""
CHROMIUM_FLAGS+=" --ozone-platform=wayland"
24 changes: 24 additions & 0 deletions config/files/usr/etc/chromium/policies/managed/hardening.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"DefaultSensorsSetting": 2,
"EnableMediaRouter": false,
"SuggestedContentEnabled": false,
"AccessibilityImageLabelsEnabled": false,
"BackgroundModeEnabled": false,
"BlockThirdPartyCookies": true,
"ChromeCleanupReportingEnabled": false,
"ClickToCallEnabled": false,
"HttpsOnlyMode": "force_enabled",
"MediaRecommendationsEnabled": false,
"MetricsReportingEnabled": false,
"NetworkPredictionOptions": 2,
"PaymentMethodQueryEnabled": false,
"PromotionalTabsEnabled": false,
"RemoteDebuggingAllowed": false,
"SharedClipboardEnabled": false,
"ShowFullUrlsInAddressBar": true,
"SyncDisabled": true,
"TranslateEnabled": false,
"UrlKeyedAnonymizedDataCollectionEnabled": false,
"WebRtcEventLogCollectionAllowed": false,
"WebRtcIPHandling": "disable_non_proxied_udp"
}
1 change: 1 addition & 0 deletions config/files/usr/etc/sudoers.d/timeout
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Defaults timestamp_timeout = 0
6 changes: 6 additions & 0 deletions config/scripts/file-permissions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

# Tell build process to exit if there are any errors.
set -euo pipefail

chmod 440 /usr/etc/sudoers.d/timeout

0 comments on commit f7e5e7c

Please sign in to comment.