fix(ci): unblock dependabot dependency PR checks (#658)
This commit is contained in:
parent
5be4fd9138
commit
42f1d40f1f
5 changed files with 84 additions and 49 deletions
|
|
@ -69,8 +69,9 @@ impl ScreenshotTool {
|
|||
);
|
||||
|
||||
// Reject filenames with shell-breaking characters to prevent injection in sh -c
|
||||
const SHELL_UNSAFE: &[char] =
|
||||
&['\'', '"', '`', '$', '\\', ';', '|', '&', '\n', '\0', '(', ')'];
|
||||
const SHELL_UNSAFE: &[char] = &[
|
||||
'\'', '"', '`', '$', '\\', ';', '|', '&', '\n', '\0', '(', ')',
|
||||
];
|
||||
if safe_name.contains(SHELL_UNSAFE) {
|
||||
return Ok(ToolResult {
|
||||
success: false,
|
||||
|
|
@ -307,10 +308,7 @@ mod tests {
|
|||
.await
|
||||
.unwrap();
|
||||
assert!(!result.success);
|
||||
assert!(result
|
||||
.error
|
||||
.unwrap()
|
||||
.contains("unsafe for shell execution"));
|
||||
assert!(result.error.unwrap().contains("unsafe for shell execution"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue