Skip to content

Commit eb0270c

Browse files
docs: modify threat model and other small improvements (#31)
1 parent 997b079 commit eb0270c

File tree

7 files changed

+247
-147
lines changed

7 files changed

+247
-147
lines changed

website/docs/configuration.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,27 @@ Everything about how Layne behaves on a given repo lives in `config/layne.json`.
99
```json title="config/layne.json"
1010
{
1111
"$global": {
12+
"mode": "changed_files",
13+
"contextLines": 8,
14+
"timeoutMinutes": 10,
1215
"semgrep": {
16+
"enabled": true,
1317
"extraArgs": ["--config", "auto"]
1418
},
1519
"trufflehog": {
20+
"enabled": true,
1621
"extraArgs": []
1722
},
1823
"trigger": {
1924
"on": "pull_request"
2025
},
2126
"labels": {
22-
"onFailure": ["needs-security-review"],
23-
"removeOnFailure": ["security-ok"],
24-
"onSuccess": ["security-ok"],
25-
"removeOnSuccess": ["needs-security-review"]
27+
"onFailure": ["needs-security-review"],
28+
"removeOnFailure": ["security-ok"],
29+
"onSuccess": ["security-ok"],
30+
"removeOnSuccess": ["needs-security-review"],
31+
"onException": ["security-exception-used"],
32+
"removeOnException": ["needs-security-review"]
2633
},
2734
"notifications": {
2835
"rocketchat": {
@@ -31,7 +38,12 @@ Everything about how Layne behaves on a given repo lives in `config/layne.json`.
3138
}
3239
},
3340
"comment": {
34-
"enabled": false
41+
"enabled": false,
42+
"template": null
43+
},
44+
"exceptionApprovers": {
45+
"users": ["security-lead"],
46+
"teams": ["acme/security-team"]
3547
}
3648
}
3749
}
@@ -113,7 +125,7 @@ Hard time limit for a single scan job. If the limit is reached, the job is rethr
113125
- **Default:** `10`
114126
- Accepts any positive integer
115127

116-
Raise this for large monorepos where Semgrep takes a long time, or lower it to fail fast on repos that should scan quickly.
128+
Raise this for large monorepos where scanners may take a long time, or lower it to fail fast on repos that should scan quickly.
117129

118130
```json title="config/layne.json"
119131
{
@@ -326,11 +338,6 @@ When an exception approval is used, you can configure a label to be added or rem
326338

327339
If a label listed in `onFailure`, `onSuccess`, or `onException` does not exist on the repository, Layne creates it automatically with a neutral gray color (`#ededed`). You do not need to pre-create labels.
328340

329-
### Global vs per-repo
330-
331-
A per-repo `labels` block replaces the `$global` block entirely - it is not merged key-by-key. If neither `$global` nor the repo defines a `labels` key, the feature is a no-op for that repo.
332-
333-
334341
## Exception Approvals
335342

336343
Configure specific users or teams who can approve PRs that would otherwise fail. See [Exception Approvals](./exception-approvals.md) for full documentation.

website/docs/local-development.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Local Development
22

3-
This guide explains how to run Layne entirely on your own machine so you can develop and test features without touching production. By the end, you will have a real GitHub App delivering live webhooks to your laptop, and a way to replay those webhooks instantly without opening a real pull request every time.
3+
When developing new features or modifying Layne in general, you should avoid doing so in production. These steps will guide you through setting up a local development environment for Layne.
44

55
## Prerequisites
66

website/docs/scanners/semgrep.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ Layne's reporter also handles `critical` severity (mapped to `failure`), but Sem
5353

5454
**`extraArgs` replaces the default entirely.** If you set per-repo `extraArgs`, include everything you need - there is no merging with the global value.
5555

56+
:::warning paths.include and paths.exclude in rules are not effective
57+
Semgrep rules support a `paths:` block to restrict which files a rule applies to. This does not work reliably with Layne. Because Layne passes an explicit list of file paths to Semgrep rather than a directory, Semgrep bypasses rule-level path filtering — `paths.include` and `paths.exclude` entries are silently ignored. This is a known issue. Avoid writing or relying on rules that use `paths:` filters when using Layne.
58+
:::
59+
5660
### `--disable-nosem`
5761

5862
:::warning

website/docs/security-architecture.md

Lines changed: 0 additions & 134 deletions
This file was deleted.

0 commit comments

Comments
 (0)