@produtype/core 0.22.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.
@@ -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
- const worstOpen = actionable.reduce((worst, finding) => (SEVERITY_WEIGHT[finding.stakes] > SEVERITY_WEIGHT[worst] ? finding.stakes : worst), 'info');
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.22.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": {