forked from vibemafiaclub/argos
-
Notifications
You must be signed in to change notification settings - Fork 0
๐ก๏ธ Sentinel: [HIGH] CLI URL ๋ช ๋ น์ด ์ฃผ์ ์ทจ์ฝ์ ์์ #476
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
Open
seonghobae
wants to merge
3
commits into
developmental
Choose a base branch
from
sentinel-cli-auth-url-validation-16912481461057413433
base: developmental
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+30
โ0
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
d5ef24e
๋ณด์(CLI): CLI ์ธ์ฆ ์ ๋ช
๋ น์ด ์ฃผ์
๋ฐฉ์ง๋ฅผ ์ํ URL ๊ฒ์ฆ ์ถ๊ฐ
seonghobae c13e373
๋ณด์(CLI): CLI ์ธ์ฆ ์ ๋ช
๋ น์ด ์ฃผ์
๋ฐฉ์ง๋ฅผ ์ํ URL ๊ฒ์ฆ ์ถ๊ฐ
seonghobae d5c32c5
๋ณด์(CLI): CLI ์ธ์ฆ ์ ๋ช
๋ น์ด ์ฃผ์
๋ฐฉ์ง๋ฅผ ์ํ URL ๊ฒ์ฆ ์ถ๊ฐ ๋ฐ ์ค์บ๋ ์ค์ ์์
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| CVE-2026-40345 |
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
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
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
Oops, something went wrong.
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.
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.
๐ Security & Privacy | ๐ Major | โก Quick win
๐งฉ Analysis chain
๐ Script executed:
Repository: ContextualWisdomLab/argos
Length of output: 1640
๐ Script executed:
Repository: ContextualWisdomLab/argos
Length of output: 18729
๐ Script executed:
Repository: ContextualWisdomLab/argos
Length of output: 933
๐ Web query:
Microsoft cmd.exe command separators pipe caret ampersand and Node.js windowsVerbatimArguments spawn documentation๐ก Result:
In Windows cmd.exe, specific characters have reserved functions that must be escaped to be treated as literal text [1][2]. Command Separators and Special Characters The primary special characters include the ampersand (&), pipe (|), parentheses (), and redirection symbols (<, >) [1][3]. The caret (^) serves as the escape character in cmd.exe [2]. When the interpreter encounters a caret, it treats the character immediately following it as a literal rather than a command separator or operator [2]. If you need to pass these characters as literal arguments to a command, you must use the caret [1][3]. For example, to echo an ampersand, you would use echo ^& [3]. When dealing with complex command lines, such as those involving pipes, you may need additional carets (e.g., ^^^&) because each side of a pipe creates a new cmd.exe instance, which undergoes its own round of parsing [4][5]. Node.js windowsVerbatimArguments The windowsVerbatimArguments option in Node.js child_process.spawn controls how Node.js prepares arguments before passing them to a Windows process [6]. By default (false), Node.js automatically quotes and escapes arguments on Windows to ensure they are interpreted correctly by the receiving process [7][8]. This is generally desired behavior for standard executables [7]. However, cmd.exe has its own unique, complex parsing rules that often conflict with this automatic quoting [7]. When you set windowsVerbatimArguments: true, Node.js disables its automatic quoting and escaping, passing the arguments exactly as provided [6][9]. This is particularly important when spawning cmd.exe, as it allows you to manually control the quoting and escaping according to cmd.exe's specific requirements, rather than relying on Node.js's default MSVCRT-style escaping [7][8]. This option is automatically set to true in Node.js whenever the shell option is enabled and the shell is identified as cmd.exe [6][10].
Citations:
cmd.exeํธ์ถ์ ์ ๊ฑฐํ์ธ์.new URL()์ query์|์^๋ฅผ ๊ทธ๋๋ก ๋ณด์กดํฉ๋๋ค.windowsVerbatimArguments: true์์๋ Node.js๊ฐ ์ธ์๋ฅผ ์ด์ค์ผ์ดํํ์ง ์์ผ๋ฏ๋กcmd.exe /c start๊ฐ ํด๋น ๋ฌธ์๋ฅผ ๋ช ๋ น ๊ตฌ๋ฌธ์ผ๋ก ํด์ํ ์ ์์ต๋๋ค.Windows์์๋
spawn('explorer.exe', [parsedUrl.href], { detached: true, stdio: 'ignore' })์ฒ๋ผcmd.exe๋ฅผ ๊ฑฐ์น์ง ์๋ ํธ์ถ๋ก ๋ณ๊ฒฝํ์ธ์.|,^,&๋ฅผ ํฌํจํ URL ํ ์คํธ๋ ์ถ๊ฐํ์ธ์.๐งฐ Tools
๐ช ast-grep (0.45.1)
[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { spawn } from 'child_process'
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
(detect-child-process-typescript)
๐ค Prompt for AI Agents
Source: Linters/SAST tools