up
This commit is contained in:
28
src/Scanner/docs/deno-runtime-trace.md
Normal file
28
src/Scanner/docs/deno-runtime-trace.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# Deno Runtime Trace Collection (DENO-26-010)
|
||||
|
||||
This shows how to collect Deno runtime traces with the existing analyzer runtime runner (no code changes required).
|
||||
|
||||
## Prereqs
|
||||
- `deno` binary available locally (cached; no network fetch).
|
||||
- Set `STELLA_DENO_ENTRYPOINT` to the entry file of the Deno app (relative to repo root or absolute).
|
||||
- Optional: set `STELLA_DENO_TRACE_ARGS` for extra `deno run` args (e.g., `-A`).
|
||||
|
||||
## How to run via analyzer/worker
|
||||
1. Ensure the scanner job sets the environment variable before invoking analyzers:
|
||||
- `STELLA_DENO_ENTRYPOINT=app.ts`
|
||||
2. Run the scanner (worker or CLI) as usual. The Deno analyzer will:
|
||||
- Generate and write the runtime shim next to the entrypoint.
|
||||
- Execute `deno run` with the shim to produce `deno-runtime.ndjson`.
|
||||
- Parse the NDJSON into AnalysisStore under `ScanAnalysisKeys.DenoRuntimePayload` and emit policy signals.
|
||||
|
||||
## Offline/airgap notes
|
||||
- No outbound network calls; all modules must be local/cached.
|
||||
- Paths are hashed deterministically; timestamps are UTC.
|
||||
- If `deno` is missing or entrypoint unset, runtime capture is skipped (no failure).
|
||||
|
||||
## CLI shortcut
|
||||
You can invoke the analyzer tests as a smoke check:
|
||||
```bash
|
||||
dotnet test src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Lang.Deno.Tests/StellaOps.Scanner.Analyzers.Lang.Deno.Tests.csproj -c Release
|
||||
```
|
||||
This ensures the runtime runner and parser remain healthy.
|
||||
Reference in New Issue
Block a user