mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #6726] profile request: gradle #3346
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#3346
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gcb on GitHub (Apr 30, 2025).
Original GitHub issue: https://github.com/netblue30/firejail/issues/6726
starting this outside of the main profile request issue, because i am not sure how to address gradle.
it is the most egregious entry point for a supply chain attack. and to make it worse, the common usage starts with
./gradlewwhich kinda can bypass anything since it starts unsandboxed.Anyone have any ideas how to wrap this one in a practical way?
i see that scripts tries to fork either:
$JAVA_HOME/jre/sh/java$JAVA_HOME/bin/java@kmk3 commented on GitHub (Apr 30, 2025):
For wrapping
./gradlew:Create a new profile normally (such as gradlew.profile) and a wrapper script,
then make sure to always remember to call the wrapper instead of
./gradlew.Example:
~/bin/gradlew:
Run it as
gradlew(instead of./gradlew).You could also see what
./gradlewgenerally does and try creating a genericgradle wrapper (plus a firejail gradle.profile) that calls
gradlewithouthaving to run
./gradlew.@gcb commented on GitHub (May 5, 2025):
it uses full paths for everything and that wrapper is just a list of fixed paths with a download (to local work dir!) in the end if none are found. Env paths are never used... sigh i hate hacks to work around dumb devs so much. and that is mostly the definition of {js,java}-everything.
I was hopping for something that the entire team could use (we do distribute common firejail profiles). Guess i can just overwrite the gradlew scripts and have a monitor job alert if the files change. That can take care of the repos we own but not the crap they can download from outside.
@gcb commented on GitHub (May 19, 2025):
sigh. FYI. Found another annoyance that does the exact same thing.
/usr/bin/iexFor some reason the script checks where it is, check if itself is a link, follow that link, and callelixirfrom the path it ultimately finds.