@fabriziosalmi/slopless 1.17.1 → 1.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/engine/api.d.ts +1 -0
- package/dist/engine/api.js +147 -146
- package/dist/index.d.ts +1 -0
- package/dist/index.js +169 -168
- package/package.json +1 -1
- package/rules/VBC-901.yaml +45 -2
- package/rules/VBC-920.yaml +28 -1
package/package.json
CHANGED
package/rules/VBC-901.yaml
CHANGED
|
@@ -12,8 +12,31 @@ match:
|
|
|
12
12
|
# Nothing starting with 255 is a host: 240.0.0.0/4 is reserved, so a dotted
|
|
13
13
|
# quad there is a netmask or a broadcast address — `isInNet(host, "172.16.0.0",
|
|
14
14
|
# "255.240.0.0")` names a mask, not a machine.
|
|
15
|
+
#
|
|
16
|
+
# The same reasoning covers the IANA special-purpose ranges that are not
|
|
17
|
+
# globally reachable (#43). They are what SSRF and egress blocklists list, so
|
|
18
|
+
# reporting them made a project's most defensive file its noisiest:
|
|
19
|
+
# 0.0.0.0/8 "this network", all of it, not only 0.0.0.0 (RFC 6890)
|
|
20
|
+
# 192.0.0.0/24 IETF protocol assignments (RFC 6890)
|
|
21
|
+
# 192.88.99.0/24 deprecated 6to4 relay anycast (RFC 7526)
|
|
22
|
+
# 100.64.0.0/10 shared address space, carrier-grade NAT (RFC 6598)
|
|
23
|
+
# 198.18.0.0/15 benchmarking (RFC 2544)
|
|
24
|
+
# The fire list keeps their neighbours, so the exclusion cannot widen quietly.
|
|
25
|
+
#
|
|
26
|
+
# RFC 1918 private ranges are deliberately still reported: 192.168.1.50 in
|
|
27
|
+
# code is exactly one environment. 169.254.0.0/16 is too, for the opposite
|
|
28
|
+
# reason from the above: a literal link-local address is almost always the
|
|
29
|
+
# cloud metadata service being called, not being blocked.
|
|
30
|
+
#
|
|
31
|
+
# Well-known public resolvers are not reported, by exact address and never by
|
|
32
|
+
# subnet: Google, Cloudflare (1.1.1.2 and 1.1.1.3 are its filtered variants),
|
|
33
|
+
# Quad9, OpenDNS and AdGuard. The message says an address pins code to one
|
|
34
|
+
# environment, and an anycast resolver reachable from everywhere does not —
|
|
35
|
+
# it is a documented choice that outlives the project, which is the call
|
|
36
|
+
# l0-git#29 made too. Decided in #43. The fire list keeps each one's
|
|
37
|
+
# neighbour, so a typo'd or unknown address beside them is still reported.
|
|
15
38
|
regex: >-
|
|
16
|
-
\b(?!127\.|0
|
|
39
|
+
\b(?!127\.|0\.|255\.|192\.0\.2\.|198\.51\.100\.|203\.0\.113\.|192\.0\.0\.|192\.88\.99\.|100\.(?:6[4-9]|[7-9][0-9]|1[01][0-9]|12[0-7])\.|198\.1[89]\.|(?:8\.8\.8\.8|8\.8\.4\.4|1\.1\.1\.1|1\.0\.0\.1|1\.1\.1\.2|1\.0\.0\.2|1\.1\.1\.3|1\.0\.0\.3|9\.9\.9\.9|149\.112\.112\.112|9\.9\.9\.10|149\.112\.112\.10|9\.9\.9\.11|149\.112\.112\.11|208\.67\.222\.222|208\.67\.220\.220|208\.67\.222\.220|208\.67\.220\.222|208\.67\.222\.123|208\.67\.220\.123|94\.140\.14\.14|94\.140\.15\.15|94\.140\.14\.15|94\.140\.15\.16|94\.140\.14\.140|94\.140\.14\.141)\b)(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\b
|
|
17
40
|
scan: strings
|
|
18
41
|
file_types:
|
|
19
42
|
- js
|
|
@@ -52,7 +75,15 @@ message: >-
|
|
|
52
75
|
tests:
|
|
53
76
|
fire:
|
|
54
77
|
- const host = '192.168.1.50';
|
|
55
|
-
|
|
78
|
+
# Beside a known resolver is not a known resolver.
|
|
79
|
+
- const dns = "8.8.8.9";
|
|
80
|
+
- const near = "1.1.1.4";
|
|
81
|
+
# One step outside each special-purpose range: still a host.
|
|
82
|
+
- const near = "192.0.1.1";
|
|
83
|
+
- const relay = "192.88.100.1";
|
|
84
|
+
- const below = "100.63.255.255";
|
|
85
|
+
- const above = "100.128.0.1";
|
|
86
|
+
- const bench = "198.20.0.1";
|
|
56
87
|
quiet:
|
|
57
88
|
- const host = process.env.DB_HOST;
|
|
58
89
|
- const version = '1.2';
|
|
@@ -66,3 +97,15 @@ tests:
|
|
|
66
97
|
# "255.240.0.0")` still reports — on the 172.16.0.0, which is an address.)
|
|
67
98
|
- const netmask = "255.240.0.0";
|
|
68
99
|
- const mask = '255.255.255.0';
|
|
100
|
+
# IANA special-purpose, not globally reachable (#43).
|
|
101
|
+
- '"192.0.0.0/24",'
|
|
102
|
+
- '"192.88.99.0/24",'
|
|
103
|
+
- const thisNet = "0.1.2.3";
|
|
104
|
+
- const cgnat = "100.64.0.1";
|
|
105
|
+
- const cgnatTop = "100.127.255.254";
|
|
106
|
+
- const benchmark = "198.18.0.1";
|
|
107
|
+
- const benchmarkTop = "198.19.255.1";
|
|
108
|
+
# Public anycast resolvers, a choice rather than an environment (#43).
|
|
109
|
+
- const dns = "8.8.8.8";
|
|
110
|
+
- const cloudflare = '1.1.1.3';
|
|
111
|
+
- 'upstream = ["9.9.9.9", "94.140.14.14"]'
|
package/rules/VBC-920.yaml
CHANGED
|
@@ -2,11 +2,22 @@ id: VBC-920
|
|
|
2
2
|
name: relative-link-format
|
|
3
3
|
severity: warning
|
|
4
4
|
category: docs
|
|
5
|
+
# Off unless the config names it (#43). In CommonMark [x](guide.md) and
|
|
6
|
+
# [x](./guide.md) resolve identically, and the message's "tool compatibility"
|
|
7
|
+
# names no tool, so this is a house style rather than a defect. Preferences
|
|
8
|
+
# nobody agreed to ship disabled; a project that wants the style can ask for it.
|
|
9
|
+
opt_in: true
|
|
5
10
|
tags:
|
|
6
11
|
- documentation
|
|
7
12
|
- maintenance
|
|
8
13
|
match:
|
|
9
|
-
|
|
14
|
+
# `#` is excluded along with schemes, absolute paths and ./ ../: an in-page
|
|
15
|
+
# anchor points at a heading in this document, not at a relative file.
|
|
16
|
+
regex: \]\((?![a-z]+:|/|\.|#)
|
|
17
|
+
# Link syntax inside `code` or a fenced block is an example of a link, not a
|
|
18
|
+
# link, and CommonMark renders neither. The CHANGELOG line that describes how
|
|
19
|
+
# Jekyll writes links was the one reported (#43).
|
|
20
|
+
exclude_markdown_code: true
|
|
10
21
|
file_types:
|
|
11
22
|
- md
|
|
12
23
|
message: >-
|
|
@@ -15,6 +26,22 @@ message: >-
|
|
|
15
26
|
tests:
|
|
16
27
|
fire:
|
|
17
28
|
- See [the guide](guide.md).
|
|
29
|
+
# A real link after the code in the same line is still a real link.
|
|
30
|
+
- 'Run `make docs`, then read [the guide](guide.md).'
|
|
18
31
|
quiet:
|
|
19
32
|
- See [the guide](./guide.md).
|
|
20
33
|
- See [the site](https://example.com).
|
|
34
|
+
# In-page anchor.
|
|
35
|
+
- See [the setup](#setup).
|
|
36
|
+
# Inside a code span.
|
|
37
|
+
- 'Inline code: `[CLI](cli-reference.html)` is how Jekyll links.'
|
|
38
|
+
- 'Double backticks: ``[a](b.md) with a ` inside`` still code.'
|
|
39
|
+
# Inside a fenced block, both fence characters.
|
|
40
|
+
- |
|
|
41
|
+
```markdown
|
|
42
|
+
[guide](guide.md)
|
|
43
|
+
```
|
|
44
|
+
- |
|
|
45
|
+
~~~
|
|
46
|
+
[guide](guide.md)
|
|
47
|
+
~~~
|