Skip to content

Commit 5409f65

Browse files
naugturboneskull
andauthored
chore: Apply suggestions from code review
Co-authored-by: Christopher Hiller <[email protected]>
1 parent e7ee012 commit 5409f65

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/content/docs/guides/policy-diff.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: How to review LavaMoat Policy and its diffs
55

66
<!-- markdownlint-disable no-inline-html -->
77

8-
This guide will help you review your policy on a continuous basis.
8+
This guide will show you how to review changes to your LavaMoat Policy File.
99

1010
## Why review Policy?
1111

@@ -18,7 +18,7 @@ If you generate the initial policy from a known uncompromised version of your ap
1818

1919
## How to review your policy?
2020

21-
LavaMoat Policy is listing all powers that a package can use. That's what you'll find in `globals` and `builtin` fields.
21+
The LavaMoat Policy lists all powers that a package can use; these are the `globals` and `builtin` fields.
2222
It also lists which other packages are allowed for the current package to import. You can follow those relations to see whether a package with access to very [powerful APIs](#powerful-apis) is used by any suspicious packages as a dependency. See [Principle of Least Authority][PoLA]
2323

2424
### What to look for when reviewing a Policy diff?
@@ -32,7 +32,7 @@ The goal of reviewing the diff is to spot a malicious package being added.
3232
- be aware that the identifier may change to `pkgC>actual-name` from `pkgB>pkgA>actual-name` BUT! If the package now also has totally different powers, it's likely a different package of the same name. Investigate! `npm ls actual-name` should help.
3333
- when a new package is added, consider limiting its powers to what you actually use.
3434

35-
#### Good practices for spotting suspicious changes
35+
#### Best Practices for Finding Suspicious Changes
3636

3737
First of all - you need to check if any of the packages get access to new [powerful APIs](#powerful-apis) unexpectedly.
3838

@@ -43,7 +43,7 @@ If a package that was supposed to only be doing basic string operations is sudde
4343
"process": false
4444
```
4545

46-
to the globals for that package in policy-override.json
46+
to the `globals` field for that package in `policy-override.json`.
4747

4848
When a new dependency shows up in `packages` field of _packageA_: look up what it's pointing to and if the dependency has access to very [powerful APIs](#powerful-apis); doublecheck whether it makes sense to you that _packageA_ would need to use it.
4949

0 commit comments

Comments
 (0)