feat(databases): Add databases run command for and isolated database CLI#118
Conversation
| eprintln!("{} {}", "database:".dark_grey(), db_id); | ||
| eprintln!("{} {}", "workspace:".dark_grey(), workspace_id); | ||
|
|
||
| let status = std::process::Command::new(&cmd[0]) |
There was a problem hiding this comment.
Potential command injection via Command API - high severity
While Rust's Command API follows security best practices by avoiding direct shell evaluation, improper handling of user inputs can still introduce command injection risks. If unsanitized user-controlled data is passed to Command::arg() or similar functions, an attacker may manipulate arguments to execute unintended commands, potentially leading to privilege escalation or system compromise
Show fix
Remediation: Validate and sanitize user inputs, avoiding direct user-controlled arguments. Prefer passing structured data instead of raw strings, especially with format!, use safe argument parsing methods, and restrict allowed inputs through allowlists.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
There was a problem hiding this comment.
@AikidoSec ignore: security/access is handled by API Tokens in request headers and not via CLI command access. Therefore there can be no privilege escalation via injected command arguments
There was a problem hiding this comment.
✅ Based on your feedback, we ignored this issue because of the following reason:
security/access is handled by API Tokens in request headers and not via CLI command access. Therefore there can be no privilege escalation via injected command arguments
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
| /// Description for the auto-created database (only used when --database is omitted) | ||
| #[arg(long)] |
There was a problem hiding this comment.
super nit: this user-facing flag is --description but databases create (line 571) uses --name for the same underlying JSON field — both end up serialized as "name" by create_database_request. Two different flag names for the same field on sibling subcommands will trip people up. Picking one (and aligning README/SKILL.md, which currently disagree about which is canonical) would be worth a follow-up. (not blocking)
…+ refreshes near expiry
No description provided.