Commit Graph

21 Commits

Author SHA1 Message Date
Copilot
faff8ba349 Fix shell script formatting and add PR workflow validation (#3)
* Initial plan

* fix: format shell scripts with shfmt (convert tabs to 2 spaces)

Co-authored-by: kuhyx <147418882+kuhyx@users.noreply.github.com>

* feat: enhance shell-check workflow for PR pre-merge validation

- Add pull_request_target trigger to check PRs from forks
- Add explicit failure message with instructions
- Create BRANCH_PROTECTION.md with setup guide
- Ensure workflow runs on all PRs targeting main/master

Co-authored-by: kuhyx <147418882+kuhyx@users.noreply.github.com>

* refactor: improve workflow security and remove redundant exit code

- Remove pull_request_target to avoid executing untrusted fork code
- Remove redundant exit 1 from failure step
- Update documentation to reflect changes
- Standard pull_request trigger handles forks securely

Co-authored-by: kuhyx <147418882+kuhyx@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kuhyx <147418882+kuhyx@users.noreply.github.com>
2026-01-07 22:52:20 +01:00
3a62a02c3d refactor: reduce code duplication from 1.97% to 0.76%
- Add common.sh library functions: require_imagemagick, install_missing_pacman_packages, handle_arg_help_or_unknown
- Create android.sh shared library for Android utilities
- Create hosts-guard-common.sh for pacman hooks shared functions
- Update multiple scripts to source common.sh and use shared helpers
- Add print_shutdown_schedule helper in setup_midnight_shutdown.sh
- Remove duplicate log(), usage(), install_packages patterns across scripts
- Format all shell scripts with shfmt (2-space indent)
2025-12-11 18:32:15 +01:00
1f70c21007 Add custom entries protection to hosts install.sh
- Track custom blocked entries in /etc/hosts.custom-entries.state
- Block installation if any previously blocked entries are removed
- No bypass option - manual chattr removal required for changes
- Protects against impulsive unblocking of sites
- State file is also protected with chattr +i
2025-12-07 14:01:41 +01:00
42db2c1d44 fix: shellcheck issues 2025-11-01 15:36:22 +01:00
05e778832b feat: skip systemctl restart network manager serivce 2025-09-06 18:05:50 +02:00
b4df463a61 feat: steam compatibility script 2025-09-06 17:58:54 +02:00
aec80ed39c feat: speedup hosts installation 2025-09-06 14:28:17 +02:00
a765f45837 feat: add food delivery services 2025-08-07 18:51:13 +02:00
f02fb917bc fix: make messenger work 2025-07-01 19:55:18 +02:00
692a4cc634 feat: add facebook to whitelist 2025-07-01 17:50:20 +02:00
15bd7ee454 feat: added brave to the list of blocked websites 2025-06-23 11:49:43 +02:00
c64bee1e77 feat: make the install hosts script immutable readonly aand append only 2025-06-15 18:32:32 +02:00
8c8f68ea02 feat: block store steampowered 2025-06-08 15:41:20 +02:00
6c01970758 feat: whitelist some sites 2025-06-06 17:00:02 +02:00
23c190ff25 feat: discord and youtube blokced in hosts 2025-06-05 20:50:03 +02:00
b631016975 fix: etc hosts permissions 2025-06-03 22:56:45 +02:00
dd09981735 feat: use more extensive blocked hosts source 2025-06-03 22:48:17 +02:00
1ab7a9f941 feat: make etc hosts more restrictive 2025-06-03 22:41:00 +02:00
8f1d35ba6e feat: activate systemd resolve 2024-12-28 14:02:23 +01:00
ae7438edb7 chore: added block youtube 2024-12-27 21:51:35 +01:00
124e84a93c feat: block websites uising etc hosts 2024-12-27 21:49:30 +01:00