feat(security): security hardening, proxy support, and GL045 HTTP include warning
Security fixes: - Path traversal guard in include: local: — paths with ../ that escape the repo root are rejected instead of reading arbitrary host files - HTTP timeout (30 s) on all fetcher requests to prevent indefinite hangs - Response size cap (10 MiB) via io.LimitReader to prevent memory exhaustion - Cache directory and file permissions tightened to 0700/0600 - LSP Content-Length cap (64 MiB) to guard against DoS from a malicious client New feature: - --proxy flag on check, graph, and lsp subcommands; also proxy: key in .glint.yml; overrides system HTTP_PROXY / HTTPS_PROXY env vars when set; cmdGraph and cmdLSP now also load .glint.yml for proxy/token/url fallbacks New lint rule: - GL045 (Warning): include: remote: using plain http:// instead of https:// Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+8
-2
@@ -7,7 +7,7 @@ For planned work see [ROADMAP.md](ROADMAP.md).
|
||||
|
||||
## Lint rules
|
||||
|
||||
Every finding carries a stable rule ID (`GL001` – `GL043`) that can be used to
|
||||
Every finding carries a stable rule ID (`GL001` – `GL045`) that can be used to
|
||||
suppress, filter, or look up the check. Run `glint explain <ID>` for a
|
||||
description, bad-YAML example, and fix.
|
||||
|
||||
@@ -19,6 +19,7 @@ description, bad-YAML example, and fix.
|
||||
| GL002 | ERR | `workflow.rules[*].when` must be `always` or `never` |
|
||||
| GL036 | ERR | `default.timeout` is not a valid GitLab CI duration string |
|
||||
| GL040 | WARN | A stage name appears more than once in `stages:` |
|
||||
| GL045 | WARN | `include: remote:` uses plain `http://` — CI templates fetched unencrypted; prefer `https://` |
|
||||
|
||||
### Job structure
|
||||
|
||||
@@ -243,9 +244,14 @@ url: https://gitlab.example.com
|
||||
|
||||
# Default cache directory.
|
||||
cache_dir: ~/.cache/glint
|
||||
|
||||
# HTTP proxy for remote includes and GitLab API calls.
|
||||
# Overrides HTTP_PROXY / HTTPS_PROXY env vars when set.
|
||||
# Leave empty to use system proxy settings.
|
||||
proxy: http://proxy.example.com:8080
|
||||
```
|
||||
|
||||
**Priority chain:** `--token`/`--gitlab-url` flags > `.glint.yml` > environment variables.
|
||||
**Priority chain:** `--token`/`--gitlab-url`/`--proxy` flags > `.glint.yml` > environment variables.
|
||||
|
||||
### Inline suppression (`# glint: ignore`)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user