Repository navigation
Inject node deep instrumentation before '-' and '--' - #4845
Merged
Merged
Conversation
Everything after a bare '-' (script from stdin) or '--' is passed to the script, so the injected --require flags were handed to the script as arguments (e.g. gh-aw's 'node - $WORKSPACE ...' failed with ENOENT '--require'). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WAy2NfCWCJqh1KomUcCGXZ
plengauer
marked this pull request as ready for review
December 2, 2026 20:55
plengauer
enabled auto-merge (squash)
December 2, 2026 20:55
✅
|
| Descriptor | Linter | Files | Fixed | Errors | Max errors | Warnings | Elapsed time |
|---|---|---|---|---|---|---|---|
| ✅ BASH | shellcheck | 2 | 0 | 0 | 0.71s | ||
| ✅ BASH | shfmt | 2 | 0 | 0 | 0.12s | ||
| ✅ COPYPASTE | jscpd | yes | no | no | 1.0s | ||
| ✅ REPOSITORY | betterleaks | yes | no | no | 8.31s | ||
| ✅ REPOSITORY | checkov | yes | no | no | 11.94s | ||
| ✅ REPOSITORY | dustilock | yes | no | no | 14.69s | ||
| ✅ REPOSITORY | git_diff | yes | no | no | 0.15s | ||
| grype | yes | no | 1 | 71.37s | |||
| ✅ REPOSITORY | kingfisher | yes | no | no | 7.47s | ||
| ✅ REPOSITORY | osv-scanner | yes | no | no | 18.99s | ||
| ✅ REPOSITORY | secretlint | yes | no | no | 1.89s | ||
| ✅ REPOSITORY | syft | yes | no | no | 3.36s | ||
| ✅ REPOSITORY | trivy | yes | no | no | 20.74s | ||
| ✅ REPOSITORY | trivy-sbom | yes | no | no | 0.39s | ||
| ✅ REPOSITORY | trufflehog | yes | no | no | 3.82s |
Detailed Issues
⚠️ REPOSITORY / grype - 1 warning
warning: A medium vulnerability in github-action package: anthropics/claude-code-action, version v1 was found at: /.github/workflows/claude.yml
warning: 1 warnings emitted
See detailed reports in MegaLinter artifacts
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

Show us your support by starring ⭐ the repository
moflwi
previously approved these changes
Dec 2, 2026
…output Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WAy2NfCWCJqh1KomUcCGXZ
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WAy2NfCWCJqh1KomUcCGXZ
moflwi
approved these changes
Dec 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
With deep injection enabled,
node - <args>(script from stdin) breaks. The wrapper treated the bare-as an ordinary option, so--require .../deep.instrument.jswas inserted after it. Node passes everything after-(and--) to the script, so the script received--requireasargv[2].This failed the
activationjob of the Autotriage run https://github.com/plengauer/Thoth/actions/runs/46608589583/job/143769851672, where gh-aw'ssave_base_github_folders.shrunsnode - "$WORKSPACE" "$STAGING_DIR" ... <<'NODE'and crashed withENOENT: lstat '.../--require'.Fix
Do not treat
-and--as options in_otel_inject_node_args, so they take the script position and the--requireflags are emitted before them.Before:
node --require inject.js - --require instrument.js /ws /stageAfter:
node --require inject.js --require instrument.js - /ws /stageA regression test is added to
tests/auto/test_auto_injection_node.sh. I verified the generated command lines locally with stubbed helpers; I did not run the full test suite.Generated by Claude Code