Repository navigation
Detect Python ENV.KEY and os.environ.get() reads in varlock audit - #1269
Conversation
|
The changes in this PR will be included in the next version bump.
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes across the Python audit scanner, generated module, reserved-key filtering, and accompanying documentation.
- Python reads: Detects
ENV.KEYattribute access andos.environ.get()calls. - Generated module: Replaces the example attribute with
ENV.<KEY>to avoid a phantom audit reference. - Internal keys: Excludes
_VARLOCK_*and__VARLOCK_*from missing-schema reporting and schema inference. - Documentation: Updates supported Python syntax and records the patch release behavior.
Validation: 168 tests passed across scanner, well-known-key, type-generation, Python-emitter, and scan-command coverage. The full suite and website build were not run.
gpt-6.1-sol | 𝕏
📦 Bundle size
dist/ only; native binaries are versioned separately and not counted here. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
varlock-website | 6423894 | Commit Preview URL Branch Preview URL |
Nov 02 2026, 05:26 PM |
varlock
@varlock/astro-integration
@varlock/cloudflare-integration
@varlock/nuxt-integration
@varlock/vite-integration
@varlock/native-helper-darwin
@varlock/native-helper-linux-arm64
@varlock/native-helper-linux-x64
@varlock/native-helper-win32-x64
commit: |



Fixes #1266.
varlock auditdidn't recognizeENV.KEYattribute access in Python (the accessor@generatePythonEnvemits), so every item read that way was reported as unused.ENV.KEYandos.environ.get("KEY")env.pydocstring usesENV.<KEY>instead ofENV.MY_KEY, so the scan of the generated file doesn't report a phantomMY_KEY__VARLOCK_*/_VARLOCK_*are treated as well-known keys, so the generated file'sos.environ.get("__VARLOCK_ENV")isn't reported as missing from the schema