Skip to content

Commit 6e11673

Browse files
committed
feat: rewrite telemetery and configs
1 parent be8b580 commit 6e11673

37 files changed

Lines changed: 419 additions & 123 deletions

.agents/skills/limier-cli/SKILL.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ Do not use this skill for general application security review, dependency policy
3838
## Preconditions
3939

4040
- Docker must be available to the current user.
41-
- Host-signal capture is Linux-only and requires `bpftrace`.
42-
- On macOS, Windows, or CI environments without `bpftrace`, make sure the scenario sets `capture_host_signals: false` or expect an inconclusive result.
41+
- Kernel telemetry capture is Linux-only and requires `bpftrace`.
42+
- On macOS, Windows, or CI environments without `bpftrace`, use `telemetry.mode: off` for an output-only comparison that requires human review, or expect an inconclusive result.
4343

4444
For local development in this repo, prefer:
4545

@@ -60,7 +60,7 @@ When the user has not specified otherwise, the repository-owned sample uses:
6060
## Recommended Workflow
6161

6262
1. Confirm the ecosystem, package, current version, candidate version, fixture, scenario, and rules file.
63-
2. Check whether the environment can satisfy the scenario, especially `capture_host_signals`.
63+
2. Check whether the environment can satisfy the scenario's telemetry mode.
6464
3. Run Limier with explicit output paths under `out/limier/`.
6565
4. Read `summary.md` first.
6666
5. If the result is not `good_to_go`, inspect `evidence/` and any rendered explanation before making claims.
@@ -127,7 +127,7 @@ Treat `rerun` as an environment or determinism problem first, not a safe outcome
127127

128128
- Docker access problems
129129
- fixture nondeterminism
130-
- missing Linux host-signal support while `capture_host_signals` is enabled
130+
- missing Linux telemetry support while `telemetry.mode` is `required`
131131
- scenario steps failing before comparison completes
132132

133133
When debugging, inspect the scenario, evidence bundle, and environment assumptions before changing rules.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Limier is a fixture-based dependency behavior review tool. It compares a baselin
1313

1414
Limier is intentionally narrow. It is for suspicious or exploit-like dependency behavior such as new process execution, unexpected shelling out, changed install-time behavior, or other observable runtime drift. It is not a general application security scanner and it does not try to find `SQLi`, `XSS`, CSRF, or broad secure-coding flaws in the fixture itself.
1515

16-
Real host-signal capture is Linux-only and currently requires `bpftrace`. If `capture_host_signals` is enabled and Limier cannot start that backend, the run becomes inconclusive so process-coverage gaps are never hidden. On non-Linux systems, set `capture_host_signals: false` to use stdout/stderr-only comparison.
16+
Kernel telemetry is Linux-only and currently requires `bpftrace`. Telemetry defaults to `required`; if Limier cannot start or complete capture, the run becomes inconclusive so process-coverage gaps are never hidden. Use `telemetry.mode: off` for an output-only comparison that always requires human review.
1717

1818
## Documentation
1919

cmd/ci.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ type githubCIOptions struct {
2727
fixturePath string
2828
scenarioPath string
2929
rulesPath string
30+
telemetryMode string
3031
metadataOutcome string
3132
dependencyFilesChanged string
3233
prAuthor string
@@ -92,6 +93,7 @@ func newGitHubCICommand() *cobra.Command {
9293
cmd.Flags().StringVar(&options.fixturePath, "fixture", "", "Path or preset for the sample application fixture")
9394
cmd.Flags().StringVar(&options.scenarioPath, "scenario", "", "Path or preset for the scenario manifest")
9495
cmd.Flags().StringVar(&options.rulesPath, "rules", "", "Path or preset for the rules file")
96+
cmd.Flags().StringVar(&options.telemetryMode, "telemetry-mode", "", "Telemetry mode override: required or off")
9597
cmd.Flags().StringVar(&options.dependencyFilesChanged, "dependency-files-changed", "", "Whether dependency-relevant files changed: true, false, or unknown")
9698

9799
return cmd
@@ -132,6 +134,7 @@ func runGitHubCI(ctx context.Context, options githubCIOptions) error {
132134
fixturePath: options.fixturePath,
133135
scenarioPath: options.scenarioPath,
134136
rulesPath: options.rulesPath,
137+
telemetryMode: options.telemetryMode,
135138
reportPath: paths.reportPath,
136139
summaryPath: paths.summaryPath,
137140
evidencePath: paths.evidencePath,

cmd/run.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ type runOptions struct {
2525
reportPath string
2626
summaryPath string
2727
evidencePath string
28+
telemetryMode string
2829
failOn string
2930
}
3031

@@ -75,6 +76,7 @@ func newRunCommand() *cobra.Command {
7576
cmd.Flags().StringVar(&options.reportPath, "report", options.reportPath, "Path to write report.json")
7677
cmd.Flags().StringVar(&options.summaryPath, "summary", options.summaryPath, "Path to write summary.md")
7778
cmd.Flags().StringVar(&options.evidencePath, "evidence", options.evidencePath, "Path to write evidence files")
79+
cmd.Flags().StringVar(&options.telemetryMode, "telemetry-mode", "", "Telemetry mode override: required or off")
7880
cmd.Flags().StringVar(&options.failOn, "fail-on", "", "Comma-separated recommendations that should fail this command; empty preserves Limier defaults")
7981

8082
_ = cmd.MarkFlagRequired("ecosystem")
@@ -133,6 +135,7 @@ func executeRun(ctx context.Context, options runOptions) (report.Report, error)
133135
ScenarioPath: strings.TrimSpace(resolved.scenarioPath),
134136
RulesPath: strings.TrimSpace(resolved.rulesPath),
135137
EvidencePath: strings.TrimSpace(resolved.evidencePath),
138+
TelemetryMode: strings.TrimSpace(resolved.telemetryMode),
136139
})
137140

138141
if err := report.WriteAll(options.reportPath, options.summaryPath, result.Report); err != nil {
@@ -146,6 +149,8 @@ func executeRun(ctx context.Context, options runOptions) (report.Report, error)
146149
"technical_verdict", result.Report.TechnicalVerdict,
147150
"operator_recommendation", result.Report.OperatorRecommendation,
148151
"exit_code", result.Report.ExitCode,
152+
"telemetry_mode", result.Report.Telemetry.Mode,
153+
"telemetry_status", result.Report.Telemetry.Status,
149154
"report_path", options.reportPath,
150155
"summary_path", options.summaryPath,
151156
"evidence_path", result.Report.Evidence.RootPath,

docs/diagrams/limier-operation-flow.excalidraw

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,10 +1016,10 @@
10161016
{
10171017
"id": "events-note",
10181018
"type": "rectangle",
1019-
"x": 2596,
1020-
"y": 343,
1021-
"width": 445,
1022-
"height": 161,
1019+
"x": 2562,
1020+
"y": 381,
1021+
"width": 621,
1022+
"height": 179,
10231023
"angle": 0,
10241024
"strokeColor": "#264653",
10251025
"backgroundColor": "#ffffff",
@@ -3056,10 +3056,10 @@
30563056
{
30573057
"id": "s_k_L47jhPZEgk-Xx4mY8",
30583058
"type": "text",
3059-
"x": 2680.923828125,
3060-
"y": 374,
3061-
"width": 276.15234375,
3062-
"height": 90,
3059+
"x": 2680.38330078125,
3060+
"y": 421,
3061+
"width": 385.2333984375,
3062+
"height": 45,
30633063
"angle": 0,
30643064
"strokeColor": "#17324d",
30653065
"backgroundColor": "transparent",
@@ -3080,13 +3080,13 @@
30803080
"updated": 1776607283582,
30813081
"link": null,
30823082
"locked": false,
3083-
"text": "Evidence includes stdout, stderr,\nexit codes, and optional Linux\nhost-signal events when capture is\nenabled.",
3083+
"text": "Evidence includes stdout, stderr, exit codes, and\nrequired process-execution telemetry.",
30843084
"fontSize": 18,
30853085
"fontFamily": 2,
30863086
"textAlign": "center",
30873087
"verticalAlign": "middle",
30883088
"containerId": "events-note",
3089-
"originalText": "Evidence includes stdout, stderr, exit codes, and optional Linux host-signal events when capture is enabled.",
3089+
"originalText": "Evidence includes stdout, stderr, exit codes, and required process-execution telemetry.",
30903090
"autoResize": true,
30913091
"lineHeight": 1.25
30923092
},
-4.1 KB
Loading

docs/diagrams/limier-operation-flow.scene-spec.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@
314314
{
315315
"id": "events-note",
316316
"target": "compare",
317-
"label": "Evidence includes stdout, stderr, exit codes, and optional Linux host-signal events when capture is enabled.",
317+
"label": "Evidence includes stdout, stderr, exit codes, and required process-execution telemetry.",
318318
"placement": "bottom"
319319
},
320320
{

docs/diagrams/limier-operation-flow.svg

Lines changed: 2 additions & 2 deletions
Loading

docs/diagrams/limier-operation-flow.verification.json

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
"svgPath": "/Users/sardo/Projects/t/docs/diagrams/limier-operation-flow.svg",
3-
"previewPath": "/Users/sardo/Projects/t/docs/diagrams/limier-operation-flow.preview.png",
2+
"svgPath": "docs/diagrams/limier-operation-flow.svg",
3+
"previewPath": "docs/diagrams/limier-operation-flow.preview.png",
44
"screenshot": {
55
"width": 4718,
6-
"height": 829
6+
"height": 835
77
},
88
"exportSummary": {
99
"width": 4718,
10-
"height": 829.25,
10+
"height": 835,
1111
"exportPadding": 20
1212
},
1313
"inspectSummary": {
@@ -47,7 +47,7 @@
4747
"textOverlaps": 0,
4848
"crowdedLabels": 0,
4949
"diagramSprawl": 0,
50-
"occupancyRatio": 0.361,
50+
"occupancyRatio": 0.367,
5151
"maxEdgeLength": 749,
5252
"sameRankBentEdgeCount": 0,
5353
"worstEdgeDetourRatio": 3.73,
@@ -57,20 +57,15 @@
5757
"minX": 100,
5858
"minY": -235,
5959
"maxX": 4778,
60-
"maxY": 554.25
60+
"maxY": 560
6161
}
6262
},
6363
"warnings": [],
6464
"hardFailures": [],
6565
"passed": true,
66-
"metadata": {
67-
"layoutEngine": "legacy",
68-
"layoutEngineReason": "manual layout remains on the deterministic legacy path",
69-
"preset": "clean-flowchart"
70-
},
7166
"policy": {
7267
"maxWarnings": 0,
73-
"minimumEditableElements": 18,
68+
"minimumEditableElements": 2,
7469
"requireStructuredScene": true
7570
},
7671
"manualChecklist": [

docs/guide/ci-and-deploy.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,18 @@ In this path, `report.json` is the source of truth. Rendered outputs are alterna
118118

119119
## Hosted Runners vs Self-Hosted Runners
120120

121-
For GitHub-hosted runners, assume Docker is available but full host-signal capture is not. In that environment you should typically use:
121+
Telemetry defaults to `required`. Install `bpftrace` and confirm the runner supports cgroup v2 and eBPF before relying on a `good_to_go` recommendation.
122+
123+
The reusable `room215/limier-action` performs this setup on GitHub-hosted Ubuntu runners: it verifies Docker and cgroup v2, installs `bpftrace` when necessary, and runs Limier with the privileges required for capture. Direct CLI and container-image users remain responsible for preparing the host.
124+
125+
Use output-only mode only when kernel telemetry is intentionally unavailable:
122126

123127
```yaml
124-
evidence:
125-
capture_host_signals: false
128+
telemetry:
129+
mode: off
126130
```
127131

128-
Use a self-hosted Linux runner with `bpftrace` installed when you want full host telemetry.
132+
Output-only comparisons always require human review. A required telemetry failure produces `rerun` rather than silently reducing coverage.
129133

130134
## Run Limier From The Container Image
131135

@@ -161,4 +165,4 @@ docker run --rm \
161165

162166
If that command fails with a Docker socket permission error, make sure the host user already has access to `/var/run/docker.sock`. On Linux, a common fix is to add the Docker group inside the container with `--group-add "$(getent group docker | cut -d: -f3)"` alongside `--user`.
163167

164-
For the easiest containerized setup, disable host-signal capture in the scenario.
168+
For the easiest containerized setup, use `telemetry.mode: off` and treat the result as requiring human review.

0 commit comments

Comments
 (0)