Skip to content

[CLS-84749] charts: s1-agent: add fargate_ptrace_allow injection toggle#328

Open
DorEdelman wants to merge 2 commits into
masterfrom
dore-allow-ptrace-fargate
Open

[CLS-84749] charts: s1-agent: add fargate_ptrace_allow injection toggle#328
DorEdelman wants to merge 2 commits into
masterfrom
dore-allow-ptrace-fargate

Conversation

@DorEdelman
Copy link
Copy Markdown
Contributor

Summary

Adds configuration.env.injection.fargate_ptrace_allow (default true) — a toggle to control whether the agent injects ptrace-allow support into Fargate pods during webhook injection. Set to false to skip the injection for environments where it is not needed.

@DorEdelman DorEdelman force-pushed the dore-allow-ptrace-fargate branch from df3b8e3 to 5f587b1 Compare May 14, 2026 13:56
Comment thread charts/s1-agent/templates/helper/statefulset.yaml Outdated
New value configuration.env.injection.fargate_ptrace_allow (default true)
that flows to the helper as S1_FARGATE_PTRACE_ALLOW. When set to false,
the helper webhook skips injecting s1-fargate-init / libptrace_allow.so
into Fargate pods and leaves their container CMD unchanged.

Add LD_PRELOAD env to helper's agent container to load libptrace_allow.so
when ptrace injection is enabled.

Co-Authored-By: Moshe Friedland <moshe.friedland@sentinelone.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@DorEdelman DorEdelman force-pushed the dore-allow-ptrace-fargate branch from 5f587b1 to 0d7b6d0 Compare May 18, 2026 06:12
@MosheFriedland MosheFriedland changed the title charts: s1-agent: add fargate_ptrace_allow injection toggle [CLS-84749] charts: s1-agent: add fargate_ptrace_allow injection toggle May 18, 2026
Add S1_FARGATE_PTRACE_ALLOW to the env of the agent container that the
helper webhook injects into Fargate pods, sharing the existing
fargate_ptrace_allow gate next to LD_PRELOAD.

The agent's cws_deployment startup reads this env var and translates it
to the daemon_executor_ptrace_allow_enabled config key.  When set, the
agent's shell_spawner opts its remote-shell child (orphaned to pid 1 by
daemon_executor's double-fork) into prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY)
so the agent's subsequent PTRACE_ATTACH succeeds under YAMA mode 1.

The same toggle now drives all three Fargate ptrace fixes: workload
LD_PRELOAD libptrace_allow.so, workload CMD wrap with s1-fargate-init,
and the agent's own remote-shell PR_SET_PTRACER opt-in.
@MosheFriedland MosheFriedland force-pushed the dore-allow-ptrace-fargate branch from cad3d76 to f8aedf1 Compare May 27, 2026 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants