Skip to content

Commit 832700f

Browse files
committed
Properly document audit + Minor improvements elsewhere
1 parent 0f22ba9 commit 832700f

6 files changed

Lines changed: 59 additions & 24 deletions

File tree

docs/about/roadmap.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@ We'll expand (and rarely, but not impossibly, shrink) this roadmap as we make pr
88

99
## Upcoming release
1010

11-
- [X] Rewrite the `audit` feature.
12-
- [X] Fix known issues.
13-
- [x] Support it everywhere NodeJS
14-
- [x] pnpm
15-
- [x] yarn
11+
No plans made as of now. We'll be thinking about what could we do for a 3.4 release, or a [4.0 release using these plans](#4x-plans).
1612

1713
---
1814

@@ -80,7 +76,11 @@ We'll expand (and rarely, but not impossibly, shrink) this roadmap as we make pr
8076

8177
### Version 3.3
8278

83-
[Upcoming.](#upcoming-release)
79+
- [X] Rewrite the `audit` feature.
80+
- [X] Fix known issues.
81+
- [x] Support it everywhere NodeJS
82+
- [x] pnpm
83+
- [x] yarn
8484

8585
---
8686

docs/manual/audit.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,36 @@
44
55
The `audit` command is a command that automatically runs a security audit for a project you specify (or for all projects if no name is specified), and interrogates security vulnerabilities (if any) to determine if they're worth fixing.
66

7-
This is better explained [here](../learn/audit.md).
7+
## Usage
8+
9+
Run the command alone to audit all added projects one by one, or specify a project root path / name to audit that project individually.
10+
11+
```bash
12+
fkn audit [project-name]
13+
```
14+
15+
What we'll do is run your package manager's `audit` command, and if any vulnerability exists, we'll analyze it to prompt you with some generic questions - e.g. "does this project use _x_ feature?".
16+
17+
The whole purpose of this command is to find out if vulnerable dependencies are worth fixing or not, as sometimes a breaking-changes update might not be necessary. For example, if a certain package has a vulnerability related to cookies and your project is a simple RNative app that does not use cookies, it's considered _not worth fixing_.
18+
19+
### The audit process
20+
21+
A sample audit would look like this:
22+
23+
```txt
24+
=== FOUND VULNERABILITIES (001) ===
25+
26+
GHSA-XXXX-XXXX-XXXX
27+
28+
=== STARTING F*CKINGNODE SECURITY AUDIT ===
29+
30+
Does your app use {x} feature? [V:XXX] [y/N]
31+
```
32+
33+
The question prompted will vary on the identified "vulnerability vector" (denoted by the `[V:XXX]` code). Depending on your responses, we'll show different questions. Then we'll compute a percentage and show it to you, where 0% means _not worth fixing_ and 100% means _absolutely needs fixing_. This percentage, which we call Risk Factor, is computed using a basic scoring system and a bit of math.
34+
35+
We made a research paper-like page [here](../learn/audit.md) explaining in detail how this works.
36+
37+
---
38+
39+
You've now learnt everything about F\*ckingNode.

docs/manual/index.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ These are links to individual pages. For the full manual, click the first one, t
1010
- [Configuration](configuration.md)
1111
- [Main usage guide](usage.md)
1212
- [Individual project config (fknode.yaml)](fknode-yaml.md)
13-
- [Extra - Kickstart](kickstart.md)
14-
- [Extra - Commit](commit.md)
15-
- [Extra - Release](release.md)
16-
- [Extra - Launch](launch.md)
17-
- [Extra - Surrender](surrender.md)
18-
- [Extra - Setup](setup.md)
19-
- [Extra - Stats](stats.md)
13+
- [Feature - Kickstart](kickstart.md)
14+
- [Feature - Commit](commit.md)
15+
- [Feature - Release](release.md)
16+
- [Feature - Launch](launch.md)
17+
- [Feature - Setup](setup.md)
18+
- [Feature - Stats](stats.md)
19+
- [Feature - Surrender](surrender.md)
20+
- [Feature - Audit](audit.md)
2021
- [What's next?](whats-next.md)
2122

2223
For further learning:

docs/manual/surrender.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,6 @@ This feature might seem a joke, but in reality, regardless of it being a project
7272
7373
---
7474

75-
You've now learnt everything about F\*ckingNode.
75+
You've now learn how to ensure your JavaScript project dies properly.
76+
77+
Next: Audit - how to make NodeJS security audits actually understandable.

docs/manual/usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ Available flags are:
121121
| `--commit` | does the obvious (commits) |
122122
| `--update` | does the obvious (updates) |
123123

124-
\* if not obvious enough, removes files and directories you specify, such as `.react`, `out/`, `dist/`, or anything you'd like to do away with.
124+
\* if not obvious enough, removes files and directories you specify, such as `.react`, `out/`, `dist/`, or anything you want gone.
125125

126126
!!! abstract "Cross-runtime support notice"
127127

mkdocs.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ nav:
2020
- Configuration: "manual/configuration.md"
2121
- Main usage guide: "manual/usage.md"
2222
- Individual project configuration: "manual/fknode-yaml.md"
23-
- Extra - Kickstart: "manual/kickstart.md"
24-
- Extra - Commit: "manual/commit.md"
25-
- Extra - Release: "manual/release.md"
26-
- Extra - Launch: "manual/launch.md"
27-
- Extra - Setup: "manual/setup.md"
28-
- Extra - Stats: "manual/stats.md"
29-
- Extra - Surrender: "manual/surrender.md"
30-
- Extra - Audit: "manual/audit.md"
23+
- Feature - Kickstart: "manual/kickstart.md"
24+
- Feature - Commit: "manual/commit.md"
25+
- Feature - Release: "manual/release.md"
26+
- Feature - Launch: "manual/launch.md"
27+
- Feature - Setup: "manual/setup.md"
28+
- Feature - Stats: "manual/stats.md"
29+
- Feature - Surrender: "manual/surrender.md"
30+
- Feature - Audit: "manual/audit.md"
3131
- Learn - Cross-runtime support: "learn/cross-runtime-support.md"
3232
- "What's next?": "manual/whats-next.md"
3333

0 commit comments

Comments
 (0)