strix/skills/tooling/hurl.md
Use Hurl when a security proof requires an ordered HTTP session whose requests, captured values, and assertions should be code-reviewed and replayed. It is well suited to authentication flows, redirects, cookies, CSRF tokens, upload lifecycles, patch regression, and paired semantic-differential cases.
Hurl sends exactly what the file describes. It does not make state-changing requests safe. Review scope, methods, targets, and captured secrets before every run.
Prefer an official release binary or package. On macOS:
brew install hurl
hurl --version
Official alternatives include release packages and cargo install --locked hurl; see installation. Record the tool version with results.
# lab-regression.hurl
GET {{base_url}}/session
HTTP 200
[Captures]
csrf: xpath "string(//input[@name='csrf']/@value)"
[Asserts]
header "Content-Type" startsWith "text/html"
POST {{base_url}}/action
Content-Type: application/x-www-form-urlencoded
[FormParams]
csrf: {{csrf}}
operation: noop
HTTP 204
Hurl keeps cookies across requests in the same file, so an explicit Cookie header is unnecessary here.
Run one reviewed case against one authorized target first:
hurl --test --jobs 1 --connect-timeout 5s --max-time 15s \
--variable base_url=https://lab.example lab-regression.hurl
When credentials are required, pass them with --secrets-file local-secrets.env, keep that file outside version control, and avoid verbose/debug output that could expose headers or bodies. Use --variables-file only for non-secret environment values.
base_url or other explicit variables.Organize longer files around capability transitions:
fingerprint -> establish session -> reach boundary -> prove primitive -> verify state -> cleanup
At each response, assert the condition required by the next request. A final success assertion cannot explain which earlier assumption failed.
Useful Hurl features include:
--test plus JSON, JUnit, TAP, or HTML reportsConsult the Hurl manual for version-specific syntax instead of guessing an option.
base_url; never derive the destination from untrusted response data without validating scheme, host, and port.--path-as-is when literal /../ or /./ path segments are the behavior under test; otherwise Hurl's underlying URL handling can normalize them..hurl file with variableized target and no embedded secrets