@produtype/core 0.21.0 → 0.22.1
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.
|
@@ -16,9 +16,17 @@ const severityOrder = {
|
|
|
16
16
|
info: 4,
|
|
17
17
|
};
|
|
18
18
|
const phaseMeta = {
|
|
19
|
+
/**
|
|
20
|
+
* The phase is about order, not about severity.
|
|
21
|
+
*
|
|
22
|
+
* It was titled "Critical production blockers", and fifty-one of the fifty-nine plans
|
|
23
|
+
* that had a non-empty one contained no critical finding at all — a heading announcing
|
|
24
|
+
* critical blockers directly above a report whose own count of critical issues was
|
|
25
|
+
* zero. The grouping is right; the promise in the words was not.
|
|
26
|
+
*/
|
|
19
27
|
'critical-blockers': {
|
|
20
|
-
title: '
|
|
21
|
-
description: '
|
|
28
|
+
title: 'Security and access, first',
|
|
29
|
+
description: 'Identity, secrets and anything exposed without a check. These come first because the rest of the plan rests on them — not because each item is critical; every task carries its own severity.',
|
|
22
30
|
},
|
|
23
31
|
'saas-safety-layer': {
|
|
24
32
|
title: 'SaaS safety layer',
|
|
@@ -33,11 +33,20 @@ function renderTask(task) {
|
|
|
33
33
|
].join('\n');
|
|
34
34
|
}
|
|
35
35
|
function renderPhase(phase) {
|
|
36
|
+
/**
|
|
37
|
+
* Four bare words in brackets are four facts a reader cannot tell apart.
|
|
38
|
+
*
|
|
39
|
+
* `[p1, small, low, safe_template]` was the whole annotation: which of those is the
|
|
40
|
+
* effort and which the risk is only knowable from the source. They are named now,
|
|
41
|
+
* which costs a line's width and saves the reader guessing.
|
|
42
|
+
*/
|
|
36
43
|
const tasks = phase.tasks.length > 0
|
|
37
|
-
? phase.tasks.map((task) => `- ${task.id}: ${task.title}
|
|
44
|
+
? phase.tasks.map((task) => `- ${task.id}: ${task.title} — priority ${task.priority}, effort ${task.effort}, risk ${task.risk}, automation ${task.automationReadiness}`).join('\n')
|
|
38
45
|
: '- none';
|
|
39
46
|
return [
|
|
40
|
-
|
|
47
|
+
// A phase is part of the plan's list of phases, so it sits under it rather than
|
|
48
|
+
// beside it. Every phase was a sibling of the "Phases" heading that introduced them.
|
|
49
|
+
`### ${phase.title}`,
|
|
41
50
|
'',
|
|
42
51
|
phase.description,
|
|
43
52
|
'',
|
|
@@ -86,7 +86,22 @@ function buildCategoryScores(findings) {
|
|
|
86
86
|
* critical and nine passing checks is not 90% healthy". The cap keeps that;
|
|
87
87
|
* the proportion does the ranking underneath it.
|
|
88
88
|
*/
|
|
89
|
-
|
|
89
|
+
/**
|
|
90
|
+
* The ceiling follows what the report says is wrong, not what the area is worth.
|
|
91
|
+
*
|
|
92
|
+
* These are two different numbers on purpose: `stakes` is what a capability is worth
|
|
93
|
+
* before confidence is folded in, and `severity` is what the report is willing to
|
|
94
|
+
* claim about it. Using stakes here capped a category at the critical ceiling while
|
|
95
|
+
* the row beside it read "0 critical" — a Django project with four of five security
|
|
96
|
+
* checks verified and one high finding open scored 20 of 100, below an area with one
|
|
97
|
+
* of three verified.
|
|
98
|
+
*
|
|
99
|
+
* The proportion below still uses stakes, which is right: how much of what is at
|
|
100
|
+
* stake is failing does not change because the report hedged. What changes is the
|
|
101
|
+
* cap, and a cap that says "nothing looks healthy while something severe is open"
|
|
102
|
+
* has to mean the severity the reader was shown.
|
|
103
|
+
*/
|
|
104
|
+
const worstOpen = actionable.reduce((worst, finding) => (SEVERITY_WEIGHT[finding.severity] > SEVERITY_WEIGHT[worst] ? finding.severity : worst), 'info');
|
|
90
105
|
const ceiling = SEVERITY_CEILING[worstOpen];
|
|
91
106
|
return {
|
|
92
107
|
category,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@produtype/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.1",
|
|
4
4
|
"description": "Deterministic CLI and library that analyzes a web application repository and reports how far it is from production-ready for the kind of product it is meant to be.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|