Commit graph

10252 commits

Author SHA1 Message Date
netblue30
93e02ba202
Merge pull request #5648 from glitsj16/self-ref-fixes
profiles: hardening and self-ref fixes
2024-12-18 09:37:11 -05:00
netblue30
7a8b7eb671
Merge pull request #5905 from Sadoon-AlBader/master
profiles: fix misc in kmail and transmission-qt & add kontact.profile
2024-12-18 09:33:10 -05:00
netblue30
43e1833446
Merge branch 'master' into master 2024-12-18 09:32:01 -05:00
netblue30
f5b7cd96b5
Merge pull request #6314 from konstantin1722/obsidian-profile
New profile: obsidian
2024-12-18 09:26:11 -05:00
netblue30
4a7fa220f8
Merge pull request #6571 from lucasmz-dev/bubblejail-block
profiles: disable-common: add bubblejail paths
2024-12-18 09:22:23 -05:00
LucasMZ
4de34dde86
profiles: disable-common: add bubblejail paths 2024-12-17 21:27:49 -03:00
netblue30
bed96d1cad merges 2024-12-17 08:59:38 -05:00
netblue30
5f69da98c6
Merge pull request #6536 from gcb/syncthing
New profile: syncthing
2024-12-17 08:49:18 -05:00
netblue30
1fb970ec67
Merge pull request #6549 from gcb/gcb-patch-1
New profile: irssi
2024-12-17 08:40:48 -05:00
netblue30
4bca748d6e
Merge pull request #6558 from xplanthris/master
New profile: prismlauncher
2024-12-17 08:36:00 -05:00
netblue30
66c8b86b0d readme/readme.md fixes 2024-12-16 08:46:39 -05:00
netblue30
c3ee874a44 merges 2024-12-15 10:00:16 -05:00
netblue30
beaaf67506
Merge pull request #6525 from tredondo/patch-10
docs: use GitHub issues as the bug reporting address
2024-12-15 09:56:26 -05:00
netblue30
01c5dc4f00
Merge pull request #6407 from kmk3/docs-readme-firetools
docs: clarify that other tools may not be in PPA
2024-12-15 09:52:45 -05:00
netblue30
d4cd125200
Merge pull request #6463 from NetSysFire/endgame-singularity
New profile: singularity (Endgame: Singularity)
2024-12-15 09:48:29 -05:00
netblue30
411ad6c892 lutris profile (#6192) 2024-12-15 09:44:46 -05:00
Kelvin M. Klann
6ba4215c02
profiles: clamav: add /etc/clamav (#6565)
See also commit 2453f0ecf ("email-common.profile: allow clamav plugin
for claws-mail", 2023-03-07) / PR #5719.
2024-12-13 18:06:33 +00:00
Kelvin M. Klann
58c3ebef15 RELNOTES: add build and profile items
Relates to #6556 #6557 #6562.
2024-12-09 10:30:38 -03:00
Kelvin M. Klann
d3848e27ee
profiles: video-players: add missing /usr/share paths (#6557)
Add missing paths for:

* lua (for mpv)
* mplayer
* mpv
* smplayer
* vlc

Apparently mpv plugins may break without the lua path; see commit
ccff014de ("fix Lua in mpv.profile", 2020-07-28) / issue #3554.

Command used to search for relevant profiles:

    $ git grep -IE -l '/\.?(s?mplayer|mpv|vlc)' -- etc

This is a follow-up to commit e4ebbfafe ("profiles: ensure allow-lua
where mpv is allowed (#6555)", 2024-11-29).
2024-12-09 12:49:24 +00:00
Kelvin M. Klann
3826645ef1
Merge pull request #6556 from kmk3/sort-py-strip-ws
build: sort.py: strip whitespace in profiles
2024-12-05 08:01:39 +00:00
Kelvin M. Klann
08e5f8161c build: sort.py: strip whitespace in commands
Currently whitespace is left as is within an entry.

In a `protocol` entry, if there is whitespace between the command and
its argument or around an item, the item in question is dropped from the
output.

Changes:

* `protocol`: Strip all whitespace in the argument
* Other commands: Strip leading/trailing whitespace around each item,
  including any extra whitespace between a command and its argument

Note: Whitespace characters inside paths are left as is, as some paths
(such as `Foo Bar` may contain spaces.

Before:

    $ printf 'private-bin a,b\nprivate-bin  a,b\nprivate-bin  b,a\nprivate-bin  C,A  B\nprotocol  unix,net\nprotocol  inet,unix\n' \
      >foo.profile
    $ ./contrib/sort.py -n foo.profile
    sort.py: checking 1 profile(s)...
    foo.profile:5:-protocol  unix,net
    foo.profile:5:+protocol
    foo.profile:6:-protocol  inet,unix
    foo.profile:6:+protocol unix

After:

    $ printf 'private-bin a,b\nprivate-bin  a,b\nprivate-bin  b,a\nprivate-bin  C,A  B\nprotocol  unix,net\nprotocol  inet,unix\n' \
      >foo.profile
    $ ./contrib/sort.py -n foo.profile
    sort.py: checking 1 profile(s)...
    foo.profile:2:-private-bin  a,b
    foo.profile:2:+private-bin a,b
    foo.profile:3:-private-bin  b,a
    foo.profile:3:+private-bin a,b
    foo.profile:4:-private-bin  C,A  B
    foo.profile:4:+private-bin A  B,C
    foo.profile:5:-protocol  unix,net
    foo.profile:5:+protocol unix
    foo.profile:6:-protocol  inet,unix
    foo.profile:6:+protocol unix,inet
2024-12-05 04:53:41 -03:00
Kelvin M. Klann
53ff8e0ad9 build: sort.py: strip trailing whitespace in all lines
Currently the output is mangled if the last item on the line contains
trailing whitespace and is moved when sorting.

So remove trailing whitespace in all lines (that is, not just in lines
containing supported commands).

Leave leading whitespace as is for now since it could potentially be
used for indentation.

Before:

    $ printf '# hello world  \nprivate-bin a,b  \nprivate-bin b,a  \nprivate-bin  a,b\n' \
      >foo.profile
    $ ./contrib/sort.py -n foo.profile | tr ' ' .
    sort.py:.checking.1.profile(s)...
    foo.profile:3:-private-bin.b,a..
    foo.profile:3:+private-bin.a..,b

After:

    $ printf '# hello world  \nprivate-bin a,b  \nprivate-bin b,a  \n' \
      >foo.profile
    $ ./contrib/sort.py -n foo.profile | tr ' ' .
    sort.py:.checking.1.profile(s)...
    foo.profile:1:-#.hello.world..
    foo.profile:1:+#.hello.world
    foo.profile:2:-private-bin.a,b..
    foo.profile:2:+private-bin.a,b
    foo.profile:3:-private-bin.b,a..
    foo.profile:3:+private-bin.a,b
2024-12-05 04:53:35 -03:00
Kelvin M. Klann
406b1cb18e build: sort.py: rename line variables
Rename `line` to `original_line` to make it less likely to accidentally
read from/write to it instead of the fixed line.

Rename `fixed_line` to `line` to make the code shorter since it is now
referenced much more often (up to 3 times in the same line of code) than
the original line.

See also commit aa17ca5fc ("sort.py: rename protocols to
original_protocols", 2022-10-17) / PR #5429.
2024-12-05 04:43:00 -03:00
Kelvin M. Klann
ced8b19dbe build: sort.py: operate mostly on fixed_line
Set `fixed_line` to `line` and only use the latter when needed.

This makes it easier to modify `fixed_line` multiple times.
2024-12-05 04:43:00 -03:00
Syed Muhammad Shuja Haider
21779e7d37
Remove extra whitespace
Co-authored-by: rusty-snake <41237666+rusty-snake@users.noreply.github.com>
2024-12-02 15:21:18 +03:00
Syed Muhammad Shuja Haider
33f1c1669d
Update etc/profile-m-z/prismlauncher.profile to add a local file
Co-authored-by: rusty-snake <41237666+rusty-snake@users.noreply.github.com>
2024-12-02 15:21:03 +03:00
Syed Muhammad Shuja Haider
ecbb52b7c4
Add seccomp.block-secondary 2024-12-02 15:19:56 +03:00
Kelvin M. Klann
4e8253a695
build: sort.py: add -h option for help (#6562)
Print the usage if `-h` is given.

Kind of relates to #6290.
2024-12-02 10:26:21 +00:00
Syed Muhammad Shuja Haider
0e038f8217
Make it like the template, also harden it 2024-12-01 19:19:13 +03:00
Syed Muhammad Shuja Haider
aa25ca00f6
Merge branch 'netblue30:master' into master 2024-12-01 19:18:19 +03:00
Kelvin M. Klann
245a0aba89 build: sort.py: format/clarify misc options usage
This amends commit a6d2119ee ("build: sort.py: support "--" and fail on
unknown option", 2024-05-13) / PR #6339.
2024-12-01 11:45:32 -03:00
dependabot[bot]
28512d16ea build(deps): bump step-security/harden-runner from 2.10.1 to 2.10.2
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.10.1 to 2.10.2.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](91182cccc0...0080882f6c)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-01 08:19:01 +00:00
dependabot[bot]
9ddba6a09e build(deps): bump github/codeql-action from 3.27.0 to 3.27.5
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.0 to 3.27.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](662472033e...f09c1c0a94)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-01 08:18:52 +00:00
Syed Muhammad Shuja Haider
eb0c6c4d8f
Update firecfg.config 2024-11-30 19:51:51 +03:00
Syed Muhammad Shuja Haider
d0ab6e19fc
Create prismlauncher.profile 2024-11-30 19:50:47 +03:00
Kelvin M. Klann
c8614b329a private-etc: add gnutls dir to @network group
This is currently only present in `private-etc` in mutt.profile, though
it may also be used by other programs that use GNU TLS.

This was added to mutt.profile on commit a8a8e33bc ("Add whitelisting to
mutt; improve geary, new profile for neomutt", 2020-12-28) / PR #3849.

Relates to #6400.
2024-11-29 19:56:14 -03:00
Kelvin M. Klann
b554b17386 RELNOTES: add profile items
Relates to #6542 #6545 #6551 #6552 #6555.
2024-11-29 03:22:48 -03:00
Kelvin M. Klann
e4ebbfafea
profiles: ensure allow-lua where mpv is allowed (#6555)
mpv crashes if luajit is blocked:

    $ firejail --quiet --noprofile \
      --include=/etc/firejail/disable-interpreters.inc /usr/bin/mpv
    /usr/bin/mpv: error while loading shared libraries: libluajit-5.1.so.2: cannot open shared object file: Permission denied

So make sure that allow-lua.inc is always included when mpv paths (such
as ~/.config/mpv) are allowed.

Environment: luajit 2.1.1727870382-1, mpv 1:0.39.0-3 on Artix Linux.

Related commits:

* db2bdaadd ("add lua support for mpv (#3243)", 2020-02-24) /
  PR #3243
* d6a6fb905 ("Allow Lua for mpv in dolphin.profile", 2020-04-18) /
  issue #3363
* f3585e539 ("fixes, closes, enhances, improvements, and so on",
  2020-11-09) /
  issue #3686
* 3ec523f11 ("profiles: anki: allow lua", 2024-11-14) /
  PR #6545
2024-11-29 06:10:46 +00:00
Kelvin M. Klann
e99d10f2b8
profiles: tesseract: disable private-tmp to fix ocrmypdf (#6552)
As reported by @kmille[1]:

The current `tesseract` profile breaks `ocrmypdf`:

    kmille@linbox:scans ocrmypdf C.pdf del.pdf
    Scanning contents     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 1/1 0:00:00
        1  Error, could not create hOCR output file: No such file or directory                             tesseract.py:253
        1  Error, could not create TXT output file: No such file or directory                              tesseract.py:253
    OCR                   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   0% 0/1 -:--:--
    An exception occurred while executing the pipeline                                                       _common.py:294
    Traceback (most recent call last):
      File "/usr/lib/python3.12/site-packages/ocrmypdf/_pipelines/_common.py", line 259, in
    cli_exception_handler
        return fn(options, plugin_manager)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [...]
      File "/usr/lib/python3.12/pathlib.py", line 840, in stat
        return os.stat(self, follow_symlinks=follow_symlinks)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/ocrmypdf.io.0od81kk5/000001_ocr_hocr.hocr'

These are some of the commands that run in background:

    [...]
    2024/11/23 22:13:53 PID=403915 UID=0     CMD=/usr/bin/firejail /usr/bin/tesseract --list-langs
    2024/11/23 22:13:53 PID=403917 UID=0     CMD=/run/firejail/lib/fcopy /usr/bin/text2image /run/firejail/mnt/bin
    2024/11/23 22:13:53 PID=403939 UID=1000  CMD=gs -dQUIET [...] -f /tmp/ocrmypdf.io.0od81kk5/origin.pdf
    [...]
    2024/11/23 22:14:03 PID=403953 UID=0     CMD=tesseract -l eng /tmp/ocrmypdf.io.0od81kk5/000001_ocr.png [...]

Fixes #6550.

[1] https://github.com/netblue30/firejail/issues/6550#issue-2686607038

Reported-by: @kmille
Suggested-by: @kmille
2024-11-25 20:14:10 +00:00
Kelvin M. Klann
650405ebab
profiles: wget: unify wget2 into wget profile (#6551)
According to @rusty-snake[1]:

> Distributions started to replace wget with wget2 (I.e. `wget` and
> `wget2` are the same binary where one of them is a symlink to the
> other).

So move all custom entries (other than `private-bin`) from wget2.profile
into wget.profile and turn wget2.profile into more of a redirect to
wget.profile.

[1] https://github.com/netblue30/firejail/pull/6542#pullrequestreview-2426287045
2024-11-25 20:13:58 +00:00
Kelvin M. Klann
f83f81bf56 profiles: irssi: improve allow-perl comment 2024-11-25 00:13:33 -03:00
Kelvin M. Klann
c19692f443 profiles: irssi: improve description 2024-11-25 00:13:33 -03:00
celenityy
66a281875a
profiles: wget: allow ~/.local/share/wget (#6542)
wget appears to require access to this directory for HSTS & HPKP.

Without access to this directory, I get the following error when running
wget:

    Failed to read HSTS data
    Failed to read HPKP data
    Failed to write HSTS file

This fixes it.
2024-11-24 18:25:26 +00:00
Kelvin M. Klann
5804bb69a7 profiles: chatterino: fix include comments
Make them match the comments in profile.template.

Command used to search for potential issues:

    $ git grep -E '# Allow [A-Z][A-Za-z]+ .* \(blacklisted'

Added on commit 3af6c4068 ("Add Chatterino profile", 2022-12-24) /
PR #5556.
2024-11-19 16:23:36 -03:00
Kelvin M. Klann
7dacdf95e6
Update etc/inc/disable-programs.inc 2024-11-19 17:54:01 +00:00
Kelvin M. Klann
d3f68587fb
Merge pull request #6545 from haplo/anki-mpv-lua
profiles: anki: fix opening, allow media & add to firecfg
2024-11-19 17:52:12 +00:00
Fidel Ramos
c45e83e609 profiles: firecfg: enable anki 2024-11-19 14:45:02 -03:00
Fidel Ramos
024f421e30 profiles: anki: allow sound
Anki needs sound access for recording and playing media.
2024-11-19 14:44:59 -03:00
Fidel Ramos
3ec523f110 profiles: anki: allow lua
Anki uses mpv to play media, which requires the lua interpreter.

Without this, anki displays this error in the console and falls back to
mplayer:

    mpv: error while loading shared libraries: libluajit-5.1.so.2: cannot open shared object file: Permission denied
    Traceback (most recent call last):
    File "/usr/lib/python3.12/site-packages/aqt/sound.py", line 854, in setup_audio
    mpvManager = MpvManager(base_folder, media_folder)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.12/site-packages/aqt/sound.py", line 408, in __init__
    super().__init__(window_id=None, debug=False)
    File "/usr/lib/python3.12/site-packages/aqt/mpv.py", line 442, in __init__
    super().__init__(*args, **kwargs)
    File "/usr/lib/python3.12/site-packages/aqt/mpv.py", line 104, in __init__
    self._start_socket()
    File "/usr/lib/python3.12/site-packages/aqt/mpv.py", line 194, in _start_socket
    raise MPVProcessError("unable to start process")
    aqt.mpv.MPVProcessError: unable to start process

    mpv too old or failed to open, reverting to mplayer
2024-11-19 14:44:40 -03:00
Kelvin M. Klann
3a03bcd513 profiles: anki: allow mpv/mplayer
Anki relies on mpv/mplayer for playing audio and video files.
2024-11-19 14:44:33 -03:00