Validate Env File
code.validate_env_file
Overview
When you send .env content, we parse it with a conservative grammar and validate required, forbidden, and allowed keys plus optional value rules. We never evaluate command substitution, resolve ${VAR} references, or read your process environment. Likely secret values are never returned — do not use this when you need interpolation expansion or shell execution. Accepts file input via file_ref — no need to extract file content first.
Env misconfiguration and committed secrets are common. We validate safely offline without executing your values.
Reliability
STRICT and deterministic under the pinned grammar. Secret detection is best-effort and returns warnings, not failures. Line/key limit violations throw validation errors — reduce file size before retrying.
Context footprint
Returns keys metadata, errors, warnings, valid flag, and _meta. A successful call costs 1 execution credit.
When to use it
When you can supply .env text and a key/value policy to enforce.
When you need variable expansion or command evaluation.
Scope
Non-goals
- Does not evaluate commands or backticks
- Does not resolve ${VAR} interpolation
- Does not read the process environment
- Does not return raw secret values
Properties
Capabilities
Cost & billing
Flat rate per invocation
File handling
File limits
Constraints this skill applies to your input and generated files. The “Limited by” column shows the static source of each cap; none of these can be raised by upgrading your plan.
| Limit | Value | Limited by |
|---|---|---|
| Maximum size per input file | 1.9 MiB | Skill and platform maximum |
How we handle your data
What this means
This skill is designed to detect, mask, redact, validate, or otherwise process sensitive data.
Squillify guarantees
- Runs inside Squillify
- This skill runs inside Squillify.
- Payloads are not sent to an external service by this skill.
- Squillify does not permanently store submitted payloads.
- Telemetry records metadata only, not submitted content.
- Submitted payloads are not used for training.
- Submitted payloads are not reviewed by humans.
- Targets sensitive data
- The response does not contain submitted content.
Your responsibility
Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| source | object | No | Closed inline or managed-file dotenv source; omit it when content or file_ref is the source. |
| content | string | No | Exact dotenv text; omit it when source or file_ref is the content. |
| file_ref | string | No | Tenant-scoped managed dotenv file reference; omit it when source or content is used. |
| requirements | object | No | Closed required, forbidden, allowed, and typed-value policy; omit it for syntax-only checks. |
| options | object | No | Closed dotenv parser options; omit it to apply every documented default. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| valid | boolean | Yes | Whether the errors array is empty. |
| keys | array | Yes | From 0 through 10,000 parsed key receipts in file order, each a closed key, line and quote. |
| errors | array | Yes | From 0 through 100,000 blocking validation findings, each a closed code, message, optional path and line, and severity. |
| warnings | array | Yes | From 0 through 100,000 advisory findings without raw values. |
| _meta | object | Yes | Closed grammar and parsed-key-count receipt with the pinned dotenv grammar version and keyCount. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"code.validate_env_file","input":{"content":"PORT=8080\n","requirements":{"requiredKeys":["PORT"]}}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("code.validate_env_file", {"requirements":{"requiredKeys":["DATABASE_URL"]},"content":"PORT=8080\n"});Errors
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- Does not evaluate commands or backticks
- Does not resolve ${VAR} interpolation
- Does not read the process environment
- Does not return raw secret values
- Interpolating variable references
- Executing shell in values
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "code.validate_env_file",
"input": {
"requirements": {
"requiredKeys": [
"DATABASE_URL"
]
},
"content": "PORT=8080\n"
}
}Examples
Missing required key fails validation
{
"requirements": {
"requiredKeys": [
"DATABASE_URL"
]
},
"content": "PORT=8080\n"
}{
"warnings": [],
"valid": false,
"_meta": {
"grammar": "dotenv-conservative-1",
"keyCount": 1
},
"errors": [
{
"code": "ENV_REQUIRED_KEY_MISSING",
"message": "Required key 'DATABASE_URL' is missing",
"path": "DATABASE_URL",
"line": null,
"severity": "error"
}
],
"keys": [
{
"line": 1,
"key": "PORT",
"quote": "none"
}
]
}Required key present passes validation
{
"requirements": {
"requiredKeys": [
"PORT"
]
},
"content": "PORT=8080\n"
}{
"warnings": [],
"valid": true,
"_meta": {
"grammar": "dotenv-conservative-1",
"keyCount": 1
},
"errors": [],
"keys": [
{
"line": 1,
"key": "PORT",
"quote": "none"
}
]
}Recommended use cases
- Enforce required and forbidden keys in CI
- Validate integer ranges and enums on env values
- Flag likely secrets committed to .env files
Avoid for
- Interpolating variable references
- Executing shell in values
Related skills
Composable with
Safety & privacy
- Runs without calling any external service.
- Your payloads are never stored permanently.
- Telemetry captures metadata only — never your payload contents.
- We never train models on your payloads.
- No human reviews your payloads.