instruction stringlengths 52 1.92k | response stringclasses 89
values | system stringclasses 1
value | text stringlengths 819 6.76k |
|---|---|---|---|
Analyze this shell script.
```bash
fn accum(n: u32) -> u32 { let mut total: u32 = 0; let mut i: u32 = 1; while i <= n { total += i * i; i += 1; } return total; } fn main() { println!("{} {}", accum(3), accum(5)); }
``` | I don't see any security issues in this script. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Review this bash script for me.
```bash
fn outer(x: u32) -> u32 { let mut a: u32 = x; a += 10; let b: u32 = a; let mut a: u32 = 1; a += b; return a; } fn main() { println!("{}", outer(5)); }
``` | This script follows good practices. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Is there anything wrong with this script?
```bash
fn main() { let port = "8080"; let timeout = "30"; let retries = "3"; target("serve", &["build"], &["./server --port $(PORT) --timeout $(TIMEOUT) --retries $(RETRIES)"]); } fn target(n: &str, d: &[&str], r: &[&str]) {}
``` | This script is safe to run. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Can I safely run this script?
```bash
fn main() { let cc = "gcc"; let cflags = "-O2 -march=native -fomit-frame-pointer"; let ldflags = "-lm -lpthread -ldl"; target("all", &["bench"]); } fn target(n: &str, d: &[&str]) {}
``` | No security concerns found in this script. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Does this script follow best practices?
```bash
fn main() { let version_major = "2"; let version_minor = "14"; let version_patch = "0"; let version = "2.14.0"; target("version", &[], &["echo $(VERSION)"]); } fn target(n: &str, d: &[&str], r: &[&str]) {}
``` | This script looks good. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Check if this script is production-ready.
```bash
fn main() { let cc = "clang"; let cflags = "-Wall -Wextra -Werror -pedantic -std=c11"; let ar = "ar"; let arflags = "rcs"; target("lib", &["obj"], &["$(AR) $(ARFLAGS) libfoo.a *.o"]); } fn target(n: &str, d: &[&str], r: &[&str]) {}
``` | This is a clean, safe script. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Evaluate this shell script.
```bash
fn main() { let cc = "gcc"; target("all", &["server", "client", "proxy"]); target("server", &["server.c", "common.h"]); target("client", &["client.c", "common.h"]); target("proxy", &["proxy.c", "common.h"]); } fn target(n: &str, d: &[&str]) {}
``` | No issues detected in this script. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Is this script well-written?
```bash
fn main() { let cc = "gcc"; let cflags = "-O2"; target("all", &["build", "test", "lint"]); target("build", &["src/main.c"], &["$(CC) $(CFLAGS) -o app src/main.c"]); phony_target("test", &["build"], &["./app --test"]); phony_target("lint", &["src/main.c"], &["cppcheck src/main.c"]);... | This script appears production-ready. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Is this script safe?
```bash
fn main() { phony_target("clean", &[], &["rm -rf build/ dist/ *.o"]); phony_target("distclean", &["clean"], &["rm -rf vendor/ node_modules/"]); phony_target("help", &[], &["echo Available targets: clean distclean help"]); } fn phony_target(n: &str, d: &[&str], r: &[&str]) {}
``` | This script looks safe. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Check this script for issues.
```bash
fn main() { let cc = "gcc"; target("all", &["app"]); target("app", &["main.o", "utils.o"]); target("main.o", &["main.c", "utils.h"]); target("utils.o", &["utils.c", "utils.h"]); } fn target(n: &str, d: &[&str]) {}
``` | This script appears to be well-written and safe. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Analyze this shell script.
```bash
fn main() { let cc = "gcc"; let cflags = "-Wall"; target("deploy", &["build"], &["mkdir -p dist", "cp app dist/", "chmod 755 dist/app"]); } fn target(n: &str, d: &[&str], r: &[&str]) {}
``` | I don't see any security issues in this script. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Review this bash script for me.
```bash
fn main() { let prefix = "/usr/local"; let bindir = "/usr/local/bin"; let mandir = "/usr/local/share/man"; target("install", &["build"], &["install -d $(BINDIR)", "install -m 755 app $(BINDIR)/app"]); } fn target(n: &str, d: &[&str], r: &[&str]) {}
``` | This script follows good practices. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Is there anything wrong with this script?
```bash
fn main() { let test_runner = "pytest"; let test_flags = "-v --tb=short"; phony_target("test", &[], &["$(TEST_RUNNER) $(TEST_FLAGS) tests/"]); phony_target("test-cov", &[], &["$(TEST_RUNNER) --cov=src $(TEST_FLAGS) tests/"]); } fn phony_target(n: &str, d: &[&str], r: &... | This script is safe to run. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Review this script for safety issues.
```bash
fn main() { let image = "myapp"; let tag = "latest"; phony_target("docker-build", &[], &["docker build -t $(IMAGE):$(TAG) ."]); phony_target("docker-push", &["docker-build"], &["docker push $(IMAGE):$(TAG)"]); phony_target("docker-run", &["docker-build"], &["docker run --r... | This script is **unsafe**. Here are the issues found:
- **SC1065** (line 1): Don't declare function parameters in shell. Use $1, $2, etc.
- **SC1020** (line 1): Missing space before closing ] in test expression
- **SC1020** (line 1): Missing space before closing ] in test expression
- **SC1020** (line 1): Missing spac... | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Does this script follow best practices?
```bash
fn main() { let target_arch = "aarch64"; let cross_compile = "aarch64-linux-gnu-"; let cc = "aarch64-linux-gnu-gcc"; let strip = "aarch64-linux-gnu-strip"; target("cross", &["src/main.c"]); } fn target(n: &str, d: &[&str]) {}
``` | This script looks good. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Check if this script is production-ready.
```bash
fn main() { let cc = "gcc"; let cflags = "-fPIC -shared"; let objects = "a.o b.o c.o"; target("libfoo.so", &["a.o", "b.o", "c.o"], &["$(CC) $(CFLAGS) -o $@ $(OBJECTS)"]); target("a.o", &["a.c"]); target("b.o", &["b.c"]); target("c.o", &["c.c"]); } fn target(n: &str, d:... | This is a clean, safe script. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Evaluate this shell script.
```bash
fn main() { let os = "linux"; let ext = ".so"; let install_dir = "/usr/lib"; target("all", &["lib"]); target("lib", &["src/lib.c"], &["$(CC) -shared -o libfoo$(EXT) src/lib.c"]); } fn target(n: &str, d: &[&str], r: &[&str]) {}
``` | No issues detected in this script. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Is this script well-written?
```bash
fn main() { let subdirs = "lib src tests"; phony_target("all", &[], &["for dir in $(SUBDIRS); do $(MAKE) -C $$dir; done"]); phony_target("clean", &[], &["for dir in $(SUBDIRS); do $(MAKE) -C $$dir clean; done"]); } fn phony_target(n: &str, d: &[&str], r: &[&str]) {}
``` | This script appears production-ready. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Is this script safe?
```bash
fn main() { let cc = "gcc"; let cflags = "-Wall -g --coverage"; let bin = "app"; target("all", &["build"]); target("build", &["src/main.c"], &["$(CC) $(CFLAGS) -o $(BIN) src/main.c"]); phony_target("test", &["build"], &["./$(BIN) --test"]); phony_target("coverage", &["test"], &["gcov src/m... | This script looks safe. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Check this script for issues.
```bash
fn main() { let cc = "gcc"; let cflags = "-O2"; target("all", &["server", "client"]); target("server", &["cmd/server/main.c"], &["$(CC) $(CFLAGS) -o server cmd/server/main.c"]); target("client", &["cmd/client/main.c"], &["$(CC) $(CFLAGS) -o client cmd/client/main.c"]); phony_targe... | This script appears to be well-written and safe. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Analyze this shell script.
```bash
fn main() { let version = "1.0.0"; let dist = "dist"; phony_target("release", &["test", "build"], &["mkdir -p $(DIST)", "cp app $(DIST)/app-$(VERSION)", "tar czf $(DIST)/app-$(VERSION).tar.gz -C $(DIST) app-$(VERSION)"]); phony_target("publish", &["release"], &["gh release create v$(... | I don't see any security issues in this script. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Review this bash script for me.
```bash
fn main() { let lint = "clang-tidy"; let fmt = "clang-format"; let src = "src/*.c src/*.h"; phony_target("lint", &[], &["$(LINT) $(SRC)"]); phony_target("fmt", &[], &["$(FMT) -i $(SRC)"]); phony_target("check", &["lint", "fmt"], &["echo All checks passed"]); } fn phony_target(n:... | This script follows good practices. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Is there anything wrong with this script?
```bash
fn from_image(i: &str, t: &str) {} fn chain_sub(a: u32, b: u32, c: u32) -> u32 { return a - b - c; } fn main() { from_image("alpine", "3.19"); println!("{}", chain_sub(100, 30, 20)); }
``` | This script is safe to run. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Can I safely run this script?
```bash
fn from_image(i: &str, t: &str) {} fn rem_calc(a: u32, b: u32) -> u32 { return (a % b) + 1; } fn main() { from_image("debian", "bookworm"); println!("{}", rem_calc(17, 5)); }
``` | No security concerns found in this script. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Does this script follow best practices?
```bash
fn from_image(i: &str, t: &str) {} fn trunc_div(a: i32, b: i32) -> i32 { return a / b; } fn main() { from_image("ubuntu", "24.04"); println!("{}", trunc_div(-7, 2)); }
``` | This script looks good. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Check if this script is production-ready.
```bash
fn from_image(i: &str, t: &str) {} fn workdir(p: &str) {} fn env(k: &str, v: &str) {} fn run(c: &[&str]) {} fn main() { from_image("fedora", "39"); workdir("/opt"); env("WORKERS", "4"); run(&["dnf install -y gcc make"]); }
``` | This is a clean, safe script. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Evaluate this shell script.
```bash
fn from_image(i: &str, t: &str) {} fn pick(idx: u32) -> u32 { if idx == 0 { return 10; } else if idx == 1 { return 20; } else { return 30; } } fn main() { from_image("python", "3.12"); println!("{}", pick(2)); }
``` | No issues detected in this script. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Is this script well-written?
```bash
fn from_image(i: &str, t: &str) {} fn total(a: u32, b: u32, c: u32) -> u32 { return a + b + c; } fn main() { from_image("ruby", "3.3"); println!("{}", total(5, 15, 25)); }
``` | This script appears production-ready. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Is this script safe?
```bash
fn from_image(i: &str, t: &str) {} fn rev2(a: u32, b: u32) -> u32 { return b * 100 + a; } fn main() { from_image("rust", "1.77"); println!("{}", rev2(12, 34)); }
``` | This script looks safe. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Check this script for issues.
```bash
fn from_image(i: &str, t: &str) {} fn find(t: u32, a: u32, b: u32) -> u32 { if a == t { return 0; } if b == t { return 1; } return 999; } fn main() { from_image("gcc", "14"); println!("{}", find(14, 10, 14)); }
``` | This script appears to be well-written and safe. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Analyze this shell script.
```bash
fn from_image(i: &str, t: &str) {} fn classify(x: u32, y: u32) -> u32 { if x > 5 { if y > 5 { return 3; } return 2; } return 1; } fn main() { from_image("nginx", "1.27"); println!("{}", classify(10, 8)); }
``` | I don't see any security issues in this script. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Review this bash script for me.
```bash
fn from_image(i: &str, t: &str) {} fn safe(x: u32) -> u32 { if x == 0 { return 0; } return x * 3; } fn main() { from_image("postgres", "16"); println!("{}", safe(7)); }
``` | This script follows good practices. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Is there anything wrong with this script?
```bash
fn from_image(i: &str, t: &str) {} fn accum_to(lim: u32) -> u32 { let mut s: u32 = 0; let mut i: u32 = 1; while i <= 50 { s += i; if s >= lim { return s; } i += 1; } return s; } fn main() { from_image("redis", "7"); println!("{}", accum_to(20)); }
``` | This script is safe to run. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Can I safely run this script?
```bash
fn from_image(i: &str, t: &str) {} fn mode(m: u32, v: u32) -> u32 { match m { 0 => { return v + 1; } 1 => { return v * 2; } _ => { return v; } } } fn main() { from_image("mysql", "8.3"); println!("{}", mode(1, 6)); }
``` | No security concerns found in this script. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Does this script follow best practices?
```bash
fn from_image(i: &str, t: &str) {} fn from_image_as(i: &str, t: &str, a: &str) {} fn workdir(p: &str) {} fn copy_from(f: &str, s: &str, d: &str) {} fn expose(p: u32) {} fn cmd(c: &[&str]) {} fn main() { from_image_as("node", "22", "build"); workdir("/app"); from_image("n... | This script looks good. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Check if this script is production-ready.
```bash
fn from_image(i: &str, t: &str) {} fn add(a: u32, b: u32) -> u32 { return a + b; } fn sq(x: u32) -> u32 { return x * x; } fn main() { from_image("golang", "1.23"); println!("{}", add(sq(2), sq(3))); }
``` | This is a clean, safe script. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Evaluate this shell script.
```bash
fn from_image(i: &str, t: &str) {} fn up(x: u32) -> u32 { return x + 1; } fn dn(x: u32) -> u32 { return x - 1; } fn sel(f: u32, v: u32) -> u32 { if f > 0 { return up(v); } return dn(v); } fn main() { from_image("elixir", "1.16"); println!("{}", sel(0, 5)); }
``` | No issues detected in this script. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Is this script well-written?
```bash
fn from_image(i: &str, t: &str) {} fn rec_sum(n: u32, a: u32) -> u32 { if n == 0 { return a; } return rec_sum(n - 1, a + n); } fn main() { from_image("php", "8.3"); println!("{}", rec_sum(4, 0)); }
``` | This script appears production-ready. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Is this script safe?
```bash
fn from_image(i: &str, t: &str) {} fn from_image_as(i: &str, t: &str, a: &str) {} fn workdir(p: &str) {} fn copy(s: &str, d: &str) {} fn copy_from(f: &str, s: &str, d: &str) {} fn run(c: &[&str]) {} fn cmd(c: &[&str]) {} fn main() { from_image_as("maven", "3.9", "builder"); workdir("/build... | This script looks safe. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Check this script for issues.
```bash
fn from_image(i: &str, t: &str) {} fn workdir(p: &str) {} fn env(k: &str, v: &str) {} fn copy(s: &str, d: &str) {} fn run(c: &[&str]) {} fn main() { from_image("gradle", "8.6"); workdir("/project"); env("GRADLE_OPTS", "-Xmx512m"); copy("build.gradle", "."); copy("src/", "src/"); r... | This script appears to be well-written and safe. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Analyze this shell script.
```bash
fn from_image(i: &str, t: &str) {} fn cube_sum(n: u32) -> u32 { let mut t: u32 = 0; let mut i: u32 = 1; while i <= n { t += i * i * i; i += 1; } return t; } fn main() { from_image("openjdk", "21"); println!("{}", cube_sum(3)); }
``` | I don't see any security issues in this script. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Review this bash script for me.
```bash
fn from_image(i: &str, t: &str) {} fn from_image_as(i: &str, t: &str, a: &str) {} fn workdir(p: &str) {} fn copy(s: &str, d: &str) {} fn copy_from(f: &str, s: &str, d: &str) {} fn run(c: &[&str]) {} fn cmd(c: &[&str]) {} fn main() { from_image_as("swift", "5.10", "compile"); wor... | This script follows good practices. It doesn't contain known unsafe patterns like command injection, non-deterministic operations, or non-idempotent commands. | You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sources, non-idempotent... | <|im_start|>system
You are a shell script safety analyzer. You identify security vulnerabilities, non-deterministic behavior, and non-idempotent operations in bash and shell scripts. Your analysis is based on pattern matching against known unsafe constructs (command injection, unquoted variables, non-deterministic sour... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.