Commit graph

10980 commits

Author SHA1 Message Date
Amin Vakil
060b839387
new profile: claude (#7169)
Some checks failed
Build / build (push) Has been cancelled
Check-Profiles / profile-checks (push) Has been cancelled
Codespell / codespell (push) Has been cancelled
https://github.com/anthropics/claude-code
2026-05-22 15:29:23 +00:00
Kelvin M. Klann
7eda434483 RELNOTES: add feature, build, test, ci and profile items
Relates to #7157 #7159 #7160 #7162 #7163 #7164 #7166 #7167.
2026-05-22 12:14:26 -03:00
Kelvin M. Klann
cccf4c46b5 RELNOTES: reword test item
For consistency with the more recent test items.

This amends commit 082956b4f ("RELNOTES: add security, feature, test and
profile items", 2026-05-02).

Relates to #7147.
2026-05-22 12:13:59 -03:00
Fidel Ramos
8c60e29c39
new profile: tldr (#7166)
Some checks failed
Build / build (push) Has been cancelled
Check-Profiles / profile-checks (push) Has been cancelled
Codespell / codespell (push) Has been cancelled
This is a profile for tldr official Python CLI:

* https://github.com/tldr-pages/tldr
* https://github.com/tldr-pages/tldr-python-client

It's working on my machine (Arch Linux) with stable Firejail (0.9.80). I tried
to make it as restrictive as possible, as it's only downloading files and
putting them in `~/.cache/tldr`.
2026-05-18 15:02:46 +00:00
Kelvin M. Klann
772b81809c profiles: gemini: add mkdir ~/.gemini in whitelist comment
Some checks failed
Build / build (push) Waiting to run
Check-Profiles / profile-checks (push) Waiting to run
Codespell / codespell (push) Waiting to run
Test / test-main (push) Has been cancelled
Test / test-fs (push) Has been cancelled
Test / test-environment (push) Has been cancelled
Test / test-utils (push) Has been cancelled
Test / test-network (push) Has been cancelled
This amends commit 3469e5de6 ("new profile: gemini (#6936)",
2026-05-01).

Misc: This was noticed on #7169.
2026-05-17 16:04:53 -03:00
Kelvin M. Klann
f58990646e
test/fs: support and use XDG user dir env vars (#7167)
This should ensure that the tests work even if custom XDG user
directories are used (such as when set in `~/.config/user-dirs.dirs`).

The tests should work even if the relevant environment variables are
empty (or set to `$HOME`), though note that the setup commands in
test/fs/fs.sh likely still have to be executed before the .exp files are
executed.

Relates to #7147 #7163.
2026-05-17 19:04:04 +00:00
Kelvin M. Klann
34f12c442e
feature: add ${PUBLICSHARE} and ${TEMPLATES} macros (#7164)
Some checks failed
Build-extra / build-gcc (push) Has been cancelled
Build-extra / build-clang (push) Has been cancelled
Build / build (push) Has been cancelled
Check-C / scan-build (push) Has been cancelled
Check-C / cppcheck (push) Has been cancelled
Check-C / codeql-cpp (push) Has been cancelled
Check-Profiles / profile-checks (push) Has been cancelled
Codespell / codespell (push) Has been cancelled
Test / test-main (push) Has been cancelled
Test / test-fs (push) Has been cancelled
Test / test-environment (push) Has been cancelled
Test / test-utils (push) Has been cancelled
Test / test-network (push) Has been cancelled
Add the following directories from the xdg-user-dirs specification[1]:

* `XDG_PUBLICSHARE_DIR="$HOME/Public"`
* `XDG_TEMPLATES_DIR="$HOME/Templates"`

With this, all directories from the specification are supported as
macros.

See also /etc/xdg/user-dirs.defaults.

Relates to #7157 #7163.

[1] https://www.freedesktop.org/wiki/Software/xdg-user-dirs/
2026-05-15 13:11:54 +00:00
Kelvin M. Klann
2f722c85da profiles: sort macros in profile.template
Some checks failed
Build-extra / build-gcc (push) Has been cancelled
Build-extra / build-clang (push) Has been cancelled
Build / build (push) Has been cancelled
Check-C / scan-build (push) Has been cancelled
Check-C / cppcheck (push) Has been cancelled
Check-C / codeql-cpp (push) Has been cancelled
Check-Profiles / profile-checks (push) Has been cancelled
Codespell / codespell (push) Has been cancelled
Test / test-main (push) Has been cancelled
Test / test-fs (push) Has been cancelled
Test / test-environment (push) Has been cancelled
Test / test-utils (push) Has been cancelled
Test / test-network (push) Has been cancelled
Added on commit d4f824519 ("Mention macros in profile.template (#2759)",
2019-06-11).

Kind of relates to #7157.
2026-05-13 11:32:56 -03:00
Kelvin M. Klann
ad89817c08
test/fs: deduplicate xdg dirs in macro tests (#7163)
To make it easier to add new directories.

Relates to #7147.
2026-05-13 14:14:31 +00:00
orbisai0security
5b5952573f
build: netfilter.c: replace system() with execv() (#7159) 2026-05-13 13:48:27 +00:00
Kelvin M. Klann
f2df11ae37
ci: make all main make steps parallel and sync output (#7162)
Some checks failed
Build-extra / build-gcc (push) Has been cancelled
Build-extra / build-clang (push) Has been cancelled
Build / build (push) Has been cancelled
Check-C / scan-build (push) Has been cancelled
Check-C / cppcheck (push) Has been cancelled
Check-C / codeql-cpp (push) Has been cancelled
Check-Profiles / profile-checks (push) Has been cancelled
Codespell / codespell (push) Has been cancelled
Test / test-main (push) Has been cancelled
Test / test-fs (push) Has been cancelled
Test / test-environment (push) Has been cancelled
Test / test-utils (push) Has been cancelled
Test / test-network (push) Has been cancelled
Changes:

* Use `scan-build make` instead of running `scan-build` inside of `make`
  (this appears to be necessary for the output synchronization to work)
* Use `-j "$(nproc)"` and `-Orecurse` for the main `make` step in all
  jobs (including where this step is currently not parallel)

The main drawback of using parallel make (`-j`) is that the output of
different jobs may be printed interspersed, which makes the output
harder to read and less stable across multiple executions.

Example:

    job1: line1
    job1: line2
    job2: line1
    job3: line1
    job1: line3

Using `-Orecurse` should fix this by ensuring that the output of all
jobs is still printed sequentially in the order that the jobs were
executed (that is, as if `-j` was not used), even if the jobs themselves
are executed in parallel.

This should ensure that the main `make` step in each job runs its
targets in parallel and has a stable output at the same time, making it
easier to compare the logs of the same job across different CI runs.

Note: The `-O` flag is specific to GNU make and was added in version 4.0
(2013-10-09).

Related commits:

* 500d8f2d6 ("ci: run make in parallel where applicable", 2023-08-14) /
  PR #5960
* 1f6400bd8 ("build: sync scan-build target with CI", 2024-02-24) /
  PR #6222
2026-05-11 14:33:36 +00:00
Kelvin M. Klann
fce18b90f3 test/fs/fs.sh: fix typo of "root"
This amends commit 6b7d77c41 ("testing --tmpfs as root and regular
user", 2026-01-21).
2026-05-11 11:09:00 -03:00
Kelvin M. Klann
98fe3af8ba test/fs/macro-subpath.exp: fix permissions (644 -> 755)
The tests from this file are currently not even being executed in CI[1]:

    TESTING: macro subpaths (test/fs/macro-subpath.exp)
    ./fs.sh: line 130: ./macro-subpath.exp: Permission denied
    TESTING: whitelist empty (test/fs/whitelist-empty.exp)

This amends commit aff7cb630 ("feature: allow subpaths in xdg macros",
2026-04-21) / PR #7151.

Relates to #7147.

[1] https://github.com/netblue30/firejail/actions/runs/25602127293/job/75157737035
2026-05-11 11:08:51 -03:00
Kelvin M. Klann
9426ba79a2 test/fs/macro-subpath.exp: fix ls -> find
The whitelist test is currently broken[1]:

    TESTING: macro subpaths (test/fs/macro-subpath.exp)
    spawn /bin/bash
    firejail --profile=./macro-subpath-whitelist.profile ls  ~/Desktop/_firejail_test_dir [...]
    [...]
    /home/runner/Desktop/_firejail_test_dir:
    a

    [...]
    Parent is shutting down, bye...
    runner@runnervmrc6n4:~/work/firejail/firejail/test/fs$ TESTING ERROR 1.1 Desktop

This amends commit aff7cb630 ("feature: allow subpaths in xdg macros",
2026-04-21) / PR #7151.

Relates to #7147.

[1] https://github.com/netblue30/firejail/actions/runs/25638061680/job/75253423623
2026-05-11 11:08:39 -03:00
Kelvin M. Klann
0298a7eba7
profiles: use xdg macros with subpaths (#7160)
Commands used to search and replace:

    $ git grep -IElz '\$\{HOME\}/(Desktop|Documents|Downloads|Music|Pictures|Projects|Videos)' -- etc |
      xargs -0 perl -pi -e '
        s/\$\{HOME\}\/Desktop/\${DESKTOP}/;
        s/\$\{HOME\}\/Documents/\${DOCUMENTS}/;
        s/\$\{HOME\}\/Downloads/\${DOWNLOADS}/;
        s/\$\{HOME\}\/Music/\${MUSIC}/;
        s/\$\{HOME\}\/Pictures/\${PICTURES}/;
        s/\$\{HOME\}\/Projects/\${PROJECTS}/;
        s/\$\{HOME\}\/Videos/\${VIDEOS}/;
      '

Note: The entries in the following profiles were sorted manually:

* etc/profile-m-z/Mathematica.profile
* etc/profile-m-z/prismlauncher.profile
* etc/profile-m-z/zoom.profile

This is a follow-up to #7151.
2026-05-11 14:07:42 +00:00
Kelvin M. Klann
3664750f8f profiles: zoom: sort noblacklist/whitelist sections
Some checks failed
Build-extra / build-gcc (push) Has been cancelled
Build-extra / build-clang (push) Has been cancelled
Build / build (push) Has been cancelled
Check-C / scan-build (push) Has been cancelled
Check-C / cppcheck (push) Has been cancelled
Check-C / codeql-cpp (push) Has been cancelled
Check-Profiles / profile-checks (push) Has been cancelled
Codespell / codespell (push) Has been cancelled
Test / test-main (push) Has been cancelled
Test / test-fs (push) Has been cancelled
Test / test-environment (push) Has been cancelled
Test / test-utils (push) Has been cancelled
Test / test-network (push) Has been cancelled
2026-05-09 10:20:32 -03:00
Kelvin M. Klann
85962902a8 profiles: keepassxc: sort noblacklist section 2026-05-09 10:20:32 -03:00
Kelvin M. Klann
5abf0577a7
feature: add ${PROJECTS} macro (#7157)
Based on the new ~/Projects directory from version 0.20 of the
xdg-user-dirs specification[1]:

* `XDG_PROJECTS_DIR="$HOME/Projects"`

Relates to #7147 #7151.

[1] https://www.freedesktop.org/wiki/Software/xdg-user-dirs/
2026-05-09 13:19:42 +00:00
Kelvin M. Klann
f4170dd82e profiles: move llm-agent-common.inc to llm-agent-common.profile
Move it together with the other profiles used for redirecting in
`etc/profile*`.

Commands used to search and replace:

    git mv etc/inc/llm-agent-common.inc etc/profile-a-l/llm-agent-common.profile
    git grep -IElz llm-agent-common.inc | xargs -0 perl -pi -e '
      s/llm-agent-common.inc/llm-agent-common.profile/
    '

This amends commit c81777164 ("profiles: add llm-agent-common.inc
(#7158)", 2026-05-08).
2026-05-09 09:16:46 -03:00
Kelvin M. Klann
0959f0f653 profiles: nodejs-common: sort whitelist section
Some checks are pending
Build / build (push) Waiting to run
Check-Profiles / profile-checks (push) Waiting to run
Codespell / codespell (push) Waiting to run
Added on commit 699a803f1 ("Node.js stack refactoring (#4255)",
2021-05-08).
2026-05-08 13:27:32 -03:00
Kelvin M. Klann
8391ff7cbb profiles: yarn: fix comment header
Note: The missing line is already present in the other includers of
`nodejs-common.inc`:

    $ git grep -Il 'include nodejs-common.profile'
    etc/profile-m-z/node-gyp.profile
    etc/profile-m-z/node.profile
    etc/profile-m-z/npm.profile
    etc/profile-m-z/npx.profile
    etc/profile-m-z/pnpm.profile
    etc/profile-m-z/pnpx.profile
    etc/profile-m-z/semver.profile
    etc/profile-m-z/yarn.profile

This amends commit 37452ef1a ("refactor nodejs applications (npm & yarn)
(#3876)", 2021-01-11).
2026-05-08 13:25:14 -03:00
Amin Vakil
c81777164c
profiles: add llm-agent-common.inc (#7158)
Some checks are pending
Build / build (push) Waiting to run
Check-Profiles / profile-checks (push) Waiting to run
Codespell / codespell (push) Waiting to run
Note: This also sets `env NO_BROWSER=true` in pi.profile.
2026-05-08 11:08:49 +00:00
Kelvin M. Klann
46a111166e test/fs: simplify error messages in macro tests
Some checks failed
Build / build (push) Has been cancelled
Codespell / codespell (push) Has been cancelled
Test / test-main (push) Has been cancelled
Test / test-fs (push) Has been cancelled
Test / test-environment (push) Has been cancelled
Test / test-utils (push) Has been cancelled
Test / test-network (push) Has been cancelled
To make it easier to add new directories.

This is similar to commit 1511aab5f
("test/fs/disable-devnull-symlink.exp: simplify error messages",
2026-04-27).

Relates to #7147 #7151.
2026-05-05 04:46:59 -03:00
Kelvin M. Klann
6b65860e89 test/fs/fs.sh: use one mkdir per directory
To make the diffs clearer.

This amends commit df3f0b618 ("tests: make sure needed directories
exist", 2018-08-15).

Relates to #7147.
2026-05-05 04:38:11 -03:00
Kelvin M. Klann
082956b4f8 RELNOTES: add security, feature, test and profile items
Relates to #2359 #7103 #7143 #7146 #7147 #7149 #7151 #7153 #7154.
2026-05-02 07:13:02 -03:00
Kelvin M. Klann
edcc595ae2 RELNOTES: add modif, build and profile items
Relates to #5803 #7114 #7129 #7141.
2026-05-02 07:07:39 -03:00
Kelvin M. Klann
575f3d64a1 RELNOTES: add build item
Related commits:

* a7a66c5e6 ("new_syscalls.txt: fix trailing whitespace", 2026-04-17)
* 4a5ed8364 ("remove trailing spaces in
  `etc/templates/new_syscalls.txt`", 2026-04-20)
2026-05-01 11:07:39 -03:00
dependabot[bot]
b97fc172c2 build(deps): bump step-security/harden-runner from 2.16.1 to 2.19.0
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.16.1 to 2.19.0.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](fe10465874...8d3c67de8e)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-01 12:09:35 +00:00
dependabot[bot]
4b9779f741 build(deps): bump github/codeql-action from 4.35.1 to 4.35.2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.35.1 to 4.35.2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](c10b8064de...95e58e9a2c)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-01 12:08:31 +00:00
Charly Coste
0a95081e3a
security: create ~/.config/firejail to prevent sandbox escape (#7154)
A quick-and-dirty fix for
https://github.com/netblue30/firejail/issues/7132#issuecomment-4239282977
2026-05-01 11:49:04 +00:00
StellariusOrion592
45c9e2e7c1
new profile: ephoto (#7153)
Ephoto is a lightweight, user-friendly image viewer and editor built 
on the Enlightenment Foundation Libraries (EFL). It combines simplicity 
with performance, delivering a fast and efficient experience without 
unnecessary overhead.

https://www.enlightenment.org/about-ephoto
2026-05-01 11:33:36 +00:00
Amin Vakil
938bd0cd62
new profile: pi (#7136)
https://github.com/badlogic/pi-mono/tree/main/packages/coding-agent
2026-05-01 11:15:35 +00:00
Amin Vakil
84b6ebfc93
new profile: opencode (#7135)
https://github.com/anomalyco/opencode
2026-05-01 11:13:53 +00:00
Amin Vakil
3469e5de60
new profile: gemini (#6936)
https://github.com/google-gemini/gemini-cli
2026-05-01 11:09:54 +00:00
cobratbq
3cb8bb1a3d
profiles: torbrowser-launcher: add no3d (#7143) 2026-05-01 10:48:31 +00:00
Kelvin M. Klann
12d7e15a77
profiles: steam: allow more 3d cache paths (#7149)
Add the mesa path and the old nvidia path:

* `~/.cache/mesa_shader_cache`
* `~/.nv`

This is a follow-up to commit 263f576d2 ("profiles: steam: whitelist
.cache/nvidia (#7114)", 2026-04-23).
2026-05-01 10:44:12 +00:00
Kelvin M. Klann
7800a68196
Merge pull request #7151 from kmk3/improve-xdg-macros
feature: allow subpaths in xdg macros
2026-05-01 10:37:41 +00:00
Kelvin M. Klann
aff7cb630c feature: allow subpaths in xdg macros
Currently it is not possible to use XDG-related macros (such as
`${DOCUMENTS}`) with subpaths (such as `${DOCUMENTS}/foo`) and so
profiles just use `${HOME}` with a hardcoded path using the English
directory name and the subpath (such as `${HOME}/Documents/foo`).

Allow using subpaths after XDG macros, so that they automatically use
the auto-detected XDG path, just as when currently using the XDG macros
without subpaths.

Before:

    ${HOME}/Documents/foo

After:

    ${DOCUMENTS}/foo

This is a follow-up to #7147.

Closes #2359.

Relates to #4229.
2026-05-01 07:30:23 -03:00
Kelvin M. Klann
c2f12016f2 macros.c: sort macro array 2026-04-29 03:06:38 -03:00
Kelvin M. Klann
68d16bf9da macros.c: deduplicate code in expand_macros()
Use `goto` statements to reduce code duplication.
2026-04-29 03:06:38 -03:00
Kelvin M. Klann
8e1954d887 macros.c: remove redundant braces in expand_macros()
For consistency.
2026-04-29 03:06:38 -03:00
Kelvin M. Klann
1155e0da0f macros.c: fix whitespace after if in expand_macros() 2026-04-29 03:06:38 -03:00
Kelvin M. Klann
d9739c6d55 test/fs/macro.exp: increase timeout to 3s
The test is failing at multiple parts in CI due to timeouts.

From [1]:

    runner@runnervmrc6n4:~/work/firejail/firejail/test/fs$
    <=./macro-blacklist.profile ls ~/Videos; echo ret $?
    Reading profile ./macro-blacklist.profile
    firejail version 0.9.81

    Parent pid 6385, child pid 6386
    Base filesystem installed in 0.25 ms
    firejail ls /home/runner/Videos
    Child process initialized in 7.58 ms
    ls: cannot open directory '/home/runner/Videos': Permission denied

    Parent is shutting down, bye...
    ret 2
    runner@runnervmrc6n4:~/work/firejail/firejail/test/fs$
    <le touch ~/Desktop/_firejail_test_file; echo ret $?
    Reading profile ./macro-readonly.profile
    firejail version 0.9.81

    Parent pid 6390, child pid 6391
    Base filesystem installed in 3.23 ms
    TESTING ERROR 19

From [2]:

    runner@runnervmrc6n4:~/work/firejail/firejail/test/fs$
    <macro-blacklist.profile ls ~/Documents; echo ret $?
    Reading profile ./macro-blacklist.profile
    firejail version 0.9.81

    Parent pid 6382, child pid 6383
    Base filesystem installed in 0.26 ms
    firejail ls /home/runner/Documents
    Child process initialized in 7.84 ms
    ls: cannot open directory '/home/runner/Documents': Permission denied

    Parent is shutting down, bye...
    ret 2
    runner@runnervmrc6n4:~/work/firejail/firejail/test/fs$
    <macro-blacklist.profile ls ~/Downloads; echo ret $?
    Reading profile ./macro-blacklist.profile
    firejail version 0.9.81

    Parent pid 6387, child pid 6388
    Base filesystem installed in 0.25 ms
    firejail ls /home/runner/Downloads
    TESTING ERROR 11

This amends commit 574885778 ("test/fs/macro.exp: reduce timeout and
sleep", 2026-04-24) / PR #7147.

[1] https://github.com/netblue30/firejail/actions/runs/25076422708/job/73470137137
[2] https://github.com/netblue30/firejail/actions/runs/25076422708/job/73522630528
2026-04-29 02:58:06 -03:00
Kelvin M. Klann
6f4fb7e898
Merge pull request #7147 from kmk3/test-fs-improve-macros
test: improve tests related to macros
2026-04-27 11:06:34 +00:00
Kelvin M. Klann
96e66e1020 test/fs/macro.exp: check return value
Fail faster instead of waiting for the timeout.

See also commit a4e6495fd ("modif: do not follow symlinks to /dev/null
on disable (#7129)", 2026-04-17).
2026-04-27 04:47:37 -03:00
Kelvin M. Klann
574885778a test/fs/macro.exp: reduce timeout and sleep
* timeout: 10s -> 1s
* sleep: 1000ms -> 100ms
2026-04-27 04:47:37 -03:00
Kelvin M. Klann
096aa0337f test/fs/macro.exp: use _firejail_test_file
Use `_firejail_test_file` instead of `blablabla`, as the former is a
more common filename in tests and is what is actually removed in
test/fs/fs.sh.

Related commits:

* 2155203b3 ("xdg macro testing", 2018-08-07)
* 188d5f16d ("--profile=FILE rework (#6896)", 2026-01-05)
2026-04-27 04:47:37 -03:00
Kelvin M. Klann
217c96fab4 test/fs/fs.sh: move rm of xdg macro files after macro.exp
They are unrelated to private-whitelist.exp.

This amends commit 2155203b3 ("xdg macro testing", 2018-08-07).
2026-04-27 04:47:37 -03:00
Kelvin M. Klann
af26a06dd9 test/fs/fs.sh: sort rm commands for xdg paths
This amends commit 2155203b3 ("xdg macro testing", 2018-08-07).
2026-04-27 04:47:37 -03:00
Kelvin M. Klann
07fe21516a test/fs/fs.sh: fix typo of _firejail_test_file
This amends commit 2155203b3 ("xdg macro testing", 2018-08-07).
2026-04-27 04:47:37 -03:00