@readystack/resilience-plan-lint 1.0.1 → 1.0.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/README.md +4 -4
- package/license.js +22 -2
- package/package.json +3 -3
- package/rules.json +16 -8
- package/strings.json +1 -1
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Resilience Plan Lint (CER Directive)
|
|
2
2
|
|
|
3
|
-

|
|
4
|
-
|
|
5
3
|

|
|
6
4
|
|
|
7
|
-
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
Checks EU critical entity risk assessment and resilience plans against CER Directive 2022/2557 Art. 12-15: 24-hour notice, one-month report, nine-month first assessment, four-year review, all hazards and all six Art. 13(1) measure areas including drought and climate adaptation.
|
|
8
8
|
|
|
9
9
|
## Install
|
|
10
10
|
|
|
@@ -50,7 +50,7 @@ Tools: `check_text` and `check_file` (free) · `check_dir` (licence). The agent
|
|
|
50
50
|
|
|
51
51
|
The folder sweep, reports and CI mode need one licence — one payment, no subscription. Set `READYSTACK_LICENSE=<key>` or run `--license <key>` once.
|
|
52
52
|
|
|
53
|
-
[Get a licence](https://
|
|
53
|
+
[Get a licence](https://getreadystack.com/api/buy/cl/polar_cl_roT2BUBnJjC4ZxUPjFykawCuTQbNsbn1GgRWi03ruw0)
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
<!-- resilience plan lint -->
|
package/license.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const https = require('https'), fs = require('fs'), path = require('path'), os = require('os');
|
|
4
4
|
const ORG_ID = 'a5cdf664-d8e7-4f87-8895-056717aaba17';
|
|
5
5
|
const BENEFIT_ID = 'd935d626-7877-404c-ab90-7455cc38dee8'; // s142 — this product's Polar benefit (s140 law: ask with benefit_id, or one key opens every product)
|
|
6
|
-
const BUY_URL = 'https://
|
|
6
|
+
const BUY_URL = 'https://getreadystack.com/api/buy/cl/polar_cl_roT2BUBnJjC4ZxUPjFykawCuTQbNsbn1GgRWi03ruw0';
|
|
7
7
|
const SLUG = 'resilience-plan-lint';
|
|
8
8
|
const GRACE_MS = 30 * 24 * 3600 * 1000; // after a successful check, 30 days work offline
|
|
9
9
|
const RECHECK_MS = 7 * 24 * 3600 * 1000; // re-ask Polar every 7 days (refunds / cancellations)
|
|
@@ -11,8 +11,28 @@ function storePath() { return path.join(process.env.READYSTACK_HOME || path.join
|
|
|
11
11
|
function load() { try { return JSON.parse(fs.readFileSync(storePath(), 'utf8')); } catch (e) { return {}; } }
|
|
12
12
|
function save(o) { try { fs.mkdirSync(path.dirname(storePath()), { recursive: true }); fs.writeFileSync(storePath(), JSON.stringify(o)); } catch (e) { /* read-only home: still works for this run */ } }
|
|
13
13
|
const ALL_BENEFIT_ID = '22692551-5203-4467-b1a3-e33cdba6589d'; // s149 2026-09-17 — 팀 키(전 린터 한 키 · Polar benefit) · 상품 benefit 다음에 한 번 더 묻는다
|
|
14
|
+
// s170 2026-09-29 — ask OUR worker first (/api/lic): keys bought on Whop open here (a price-tier key binds to the first tool it opens · the team key opens every tool). Then the old Polar check.
|
|
14
15
|
function validate(key) {
|
|
15
|
-
return
|
|
16
|
+
return validateHub(key).then(function (h) {
|
|
17
|
+
if (h.ok) return h;
|
|
18
|
+
return validate1(key, BENEFIT_ID).then(function (r) { return (r.ok || r.offline || !/^[0-9a-f-]{36}$/.test(ALL_BENEFIT_ID)) ? r : validate1(key, ALL_BENEFIT_ID); })
|
|
19
|
+
.then(function (r) { return r.ok ? r : { ok: false, offline: !!(h.offline || r.offline) }; });
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function validateHub(key) {
|
|
23
|
+
return new Promise(function (resolve) {
|
|
24
|
+
const req = https.request({ hostname: 'getreadystack.com', path: '/api/lic?key=' + encodeURIComponent(key) + '&slug=' + encodeURIComponent(SLUG),
|
|
25
|
+
method: 'GET', timeout: 8000, headers: { 'accept': 'application/json', 'user-agent': 'readystack-cli/' + SLUG } }, function (res) {
|
|
26
|
+
let buf = ''; res.on('data', function (d) { buf += d; });
|
|
27
|
+
res.on('end', function () {
|
|
28
|
+
if (res.statusCode !== 200) return resolve({ ok: false, offline: res.statusCode >= 500 });
|
|
29
|
+
try { const j = JSON.parse(buf); resolve({ ok: !!(j && j.ok), offline: false }); } catch (e) { resolve({ ok: false, offline: false }); }
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
req.on('timeout', function () { req.destroy(); resolve({ ok: false, offline: true }); });
|
|
33
|
+
req.on('error', function () { resolve({ ok: false, offline: true }); });
|
|
34
|
+
req.end();
|
|
35
|
+
});
|
|
16
36
|
}
|
|
17
37
|
function validate1(key, ben) {
|
|
18
38
|
return new Promise(function (resolve) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@readystack/resilience-plan-lint",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "Checks EU critical entity risk assessment and resilience plans against CER Directive 2022/2557 Art. 12-15: 24-hour notice, one-month report, nine-month first assessment, four-year review, all hazards ",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"markdown lint"
|
|
18
18
|
],
|
|
19
19
|
"homepage": "https://getreadystack.com",
|
|
20
|
-
"funding": "https://
|
|
20
|
+
"funding": "https://getreadystack.com/api/buy/cl/polar_cl_roT2BUBnJjC4ZxUPjFykawCuTQbNsbn1GgRWi03ruw0",
|
|
21
21
|
"bin": {
|
|
22
22
|
"resilience-plan-lint": "cli.js"
|
|
23
23
|
},
|
package/rules.json
CHANGED
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
{
|
|
42
42
|
"id": "CER-12-HAZARDS",
|
|
43
43
|
"sev": "warning",
|
|
44
|
-
"art": "Art. 12(1)",
|
|
44
|
+
"art": "Art. 12(1) (Directive (EU) 2022/2557, OJ L 333, 27.12.2022)",
|
|
45
45
|
"title": "Hazard category missing from the all-hazards assessment",
|
|
46
46
|
"fix": "Assess natural, accidental, public health and antagonistic risks",
|
|
47
47
|
"categories": [
|
|
48
48
|
[
|
|
49
49
|
"natural hazards",
|
|
50
|
-
"natural (hazard|disaster)|flood|storm|earthquake|wildfire|heatwave|drought|climate"
|
|
50
|
+
"natural (hazard|disaster)|flood|storm|earthquake|wildfire|heatwave|drought|water scarcity|climate"
|
|
51
51
|
],
|
|
52
52
|
[
|
|
53
53
|
"accidents",
|
|
@@ -82,24 +82,32 @@
|
|
|
82
82
|
{
|
|
83
83
|
"id": "CER-13-MEASURES",
|
|
84
84
|
"sev": "warning",
|
|
85
|
-
"art": "Art. 13(1)",
|
|
85
|
+
"art": "Art. 13(1)(a)-(f) (Directive (EU) 2022/2557, OJ L 333, 27.12.2022)",
|
|
86
86
|
"title": "Resilience measure area missing from the plan",
|
|
87
|
-
"fix": "Cover all Art. 13(1) measure areas in the resilience plan",
|
|
87
|
+
"fix": "Cover all six Art. 13(1) measure areas in the resilience plan; a drought or flood hazard needs a matching prevention and climate adaptation measure under point (a)",
|
|
88
88
|
"categories": [
|
|
89
89
|
[
|
|
90
|
-
"
|
|
90
|
+
"prevention with disaster risk reduction and climate adaptation measures (point a)",
|
|
91
|
+
"climate (change )?adaptation|disaster risk reduction|drought (contingency|management|response) plan|water scarcity (plan|measure)|prevent(ion|ive)? (measure|incident)|prevent incidents"
|
|
92
|
+
],
|
|
93
|
+
[
|
|
94
|
+
"physical protection (point b)",
|
|
91
95
|
"physical protection|fenc|perimeter|access control|barrier"
|
|
92
96
|
],
|
|
93
97
|
[
|
|
94
|
-
"
|
|
98
|
+
"crisis management procedures and alert routines (point c)",
|
|
99
|
+
"crisis management|crisis response|alert routine|emergency response|incident response|escalation procedure"
|
|
100
|
+
],
|
|
101
|
+
[
|
|
102
|
+
"recovery and business continuity (point d)",
|
|
95
103
|
"business continuity|recover|alternative supply"
|
|
96
104
|
],
|
|
97
105
|
[
|
|
98
|
-
"personnel security and background checks",
|
|
106
|
+
"personnel security and background checks (point e)",
|
|
99
107
|
"background check|personnel security|vetting|access rights"
|
|
100
108
|
],
|
|
101
109
|
[
|
|
102
|
-
"staff training and exercises",
|
|
110
|
+
"staff training and exercises (point f)",
|
|
103
111
|
"training|exercise|drill|awareness"
|
|
104
112
|
]
|
|
105
113
|
]
|
package/strings.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "Resilience Plan Lint (CER Directive)",
|
|
3
|
-
"subtitle": "
|
|
3
|
+
"subtitle": "Checks EU critical entity risk assessment and resilience plans against CER Directive 2022/2557 Art. 12-15: 24-hour notice, one-month report, nine-month first assessment, four-year review, all hazards and all six Art. 13(1) measure areas including drought and climate adaptation.",
|
|
4
4
|
"bin": "resilience-plan-lint",
|
|
5
5
|
"price": 29,
|
|
6
6
|
"free": "Check one risk assessment or resilience plan file against CER Art. 12-15 and see every finding with its line number.",
|