-
Notifications
You must be signed in to change notification settings - Fork 88
[RAPTOR-14353] add watchdog #1628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
pids = [int(line.split()[0]) for line in lines] | ||
for pid in pids: | ||
print("Killing pid:", pid) | ||
subprocess.run(f"kill {pid}", shell=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semgrep identified an issue in your code:
Found 'subprocess' function 'run' with 'shell=True'. This is dangerous because this call will spawn the command using a shell process. Doing so propagates current shell settings and variables, which makes it much easier for a malicious actor to execute commands. Use 'shell=False' instead.
To resolve this comment:
✨ Commit Assistant fix suggestion
subprocess.run(f"kill {pid}", shell=True) | |
subprocess.run(f"kill {pid}", shell=False) |
View step-by-step instructions
- Change the
subprocess.run(f"kill {pid}", shell=True)
call to avoid using the shell. - Update the line to pass the command and arguments as a list, like this:
subprocess.run(["kill", str(pid)])
.
This prevents shell injection vulnerabilities and makes the command execution safer, especially when working with dynamic input.
💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>
for false positive/ar <comment>
for acceptable risk/other <comment>
for all other reasons
Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by subprocess-shell-true.
You can view more details about this finding in the Semgrep AppSec Platform.
…eration to help prevent logic diverging (#1615) * Fix Drum Inline Runner and streamline DRUM options generation * Cleanup * Refactor setup to new file * Fix mocks * Add unit tests * Change tracer
Co-authored-by: GenAI Git Bot <[email protected]>
Bumps [keras](https://github.com/keras-team/keras) from 3.10.0 to 3.11.0. - [Release notes](https://github.com/keras-team/keras/releases) - [Commits](keras-team/keras@v3.10.0...v3.11.0) --- updated-dependencies: - dependency-name: keras dependency-version: 3.11.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* [RAPTOR-14453] Regen requirements.txt to fix CVE-2025-8747 This regenerates the requirements.txt file from requirements.in, to pull in the latest keras 3.11.2, upgrading from 3.10.0. Upgrading past 3.11.0 fixes CVE-2025-8747. * Reconcile dependencies, updated IDs, tags --------- Co-authored-by: svc-harness-git2 <[email protected]>
… chat` kwargs (#1621) * Update DRUM version * Update CHANGELOG.md
…onment (#1627) * Bump requirements in GenAI Agents environment * Update * Reconcile dependencies, updated IDs, tags --------- Co-authored-by: svc-harness-git2 <[email protected]>
…for credential cache daemon (#1630) * [CFX-3334] Update to latest drgithelper and properly set permissions for credential cache daemon * Reconcile dependencies, updated IDs, tags --------- Co-authored-by: svc-harness-git2 <[email protected]>
…o gavrenkov/poc_drum_watchdog
This repository is public. Do not put here any private DataRobot or customer's data: code, datasets, model artifacts, .etc.
Demo with 3 attempts:
Uploading Screen Recording 2025-08-14 at 00.32.40.mov…
Summary
Rationale