Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **Scanner Output** — Symmetrized naming of formatters (`formatJson`, `formatText`, `formatSarif`) and fixed broken exports in `@worms-ctrl/scanner`.
- **KB Engine** — Fixed asynchronous generator logic in `chunker.ts` and removed dead exports from `@worms-ctrl/kb`.
- **Process Suspension Safety** — Fixed remediation playbook phase mapping and type definitions for safe malware containment.
- **`safe-suspend` Parameter Fix** — Removed unused `_dryRun` parameter and implemented its logic in `packages/remediation/src/scripts/safe-suspend.ts`.

### Added

Expand Down
8 changes: 6 additions & 2 deletions packages/remediation/src/scripts/safe-suspend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@

const MALICIOUS_SIGNATURES = ['bun_environment.js', 'setup_bun.js', 'trufflehog', '.truffler-cache']

export async function safeSuspend(_dryRun = false): Promise<void> {
export async function safeSuspend(dryRun = false): Promise<void> {
console.log('[safe-suspend] Scanning for malicious processes...')

for (const sig of MALICIOUS_SIGNATURES) {
// Placeholder: actual pgrep implementation
console.log(`[safe-suspend] Would freeze processes matching: ${sig}`)
if (dryRun) {
console.log(`[safe-suspend] [DRY-RUN] Would freeze processes matching: ${sig}`)
} else {
console.log(`[safe-suspend] Freezing processes matching: ${sig}`)
}
}
}
Loading