dsh-hazplan-check 0.2.1 → 0.2.3
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/CHANGELOG.md +46 -0
- package/README-es.md +21 -1
- package/README-hi.md +21 -1
- package/README-pt.md +21 -1
- package/README-zh.md +21 -1
- package/README.md +21 -1
- package/SECURITY.md +39 -0
- package/package.json +5 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.2.3
|
|
4
|
+
|
|
5
|
+
- Rework the README first screen. The H1 now names what the plugin checks rather
|
|
6
|
+
than repeating the package name, and a question-and-answer table and a standards
|
|
7
|
+
table come before the boundary paragraph.
|
|
8
|
+
|
|
9
|
+
The substance is unchanged and the boundary paragraph is verbatim: in a
|
|
10
|
+
compliance tool that paragraph is what stops a wrong "pass" being read as
|
|
11
|
+
approval, so it moved rather than shrank. What changed is the order - a reader
|
|
12
|
+
or an extractor previously met eleven badges, an install command and a
|
|
13
|
+
disclaimer before learning what the plugin does. The Q&A rows are derived from
|
|
14
|
+
each plugin's own rules and the standards table from the rule pack's
|
|
15
|
+
`document`/`number` fields, so no answer and no standard is hand-typed.
|
|
16
|
+
|
|
17
|
+
All five languages were restructured together; `check:readmes` holds them to the
|
|
18
|
+
same section count, install command and configuration keys.
|
|
19
|
+
|
|
20
|
+
## 0.2.2
|
|
21
|
+
|
|
22
|
+
- Ship `CHANGELOG.md` and `SECURITY.md` inside the package. `files` is an
|
|
23
|
+
allowlist and neither was on it, so no release note had ever reached anyone
|
|
24
|
+
who installed this package, and npm had no changelog section to show.
|
|
25
|
+
## 0.2.1
|
|
26
|
+
|
|
27
|
+
- Citation pass: every `excerpt` was checked against this repository's own
|
|
28
|
+
`rules/evidence/` record, and the record was completed for the clauses the
|
|
29
|
+
rules quote.
|
|
30
|
+
- The source moved from a commercial document site to the national standards platform record for AQ/T 3049—2013, with its authoritative version facts.
|
|
31
|
+
- Adds `rules/citations-baseline.json`, which the `check:citations` gate reads:
|
|
32
|
+
it lists any excerpt not yet traceable to the evidence, and that list can
|
|
33
|
+
only shrink.
|
|
34
|
+
## 0.2.0
|
|
35
|
+
|
|
36
|
+
- Release infrastructure brought to the family standard: `verify:self-contained`,
|
|
37
|
+
`check:lockfile`, `check:readmes` and `check:citations` gates, a `prepublishOnly` that
|
|
38
|
+
re-runs the whole chain, SECURITY.md, dependabot, and the OpenSSF Scorecard workflow.
|
|
39
|
+
- `check:citations` enforces the rule this pack's own header states: every `excerpt`
|
|
40
|
+
must be a verbatim quotation, findable in `rules/evidence/`. Rules that are not
|
|
41
|
+
traceable yet are listed in `rules/citations-baseline.json`, and that file can only
|
|
42
|
+
shrink - anything new has to be sourced before it can land.
|
|
43
|
+
- The README install command now names the published package instead of a local tarball.
|
|
44
|
+
- Five-language READMEs hold the same section count and the same configuration keys.
|
|
45
|
+
- Rule pack: 7 rules across HZ-001..HZ-007.
|
|
46
|
+
- Licensed Apache-2.0.
|
package/README-es.md
CHANGED
|
@@ -1,4 +1,24 @@
|
|
|
1
|
-
# dsh-hazplan-check
|
|
1
|
+
# dsh-hazplan-check — Verificación de la completitud de los elementos de una hoja de trabajo HAZOP y de la coherencia en la derivación de las desviaciones
|
|
2
|
+
|
|
3
|
+
`dsh-hazplan-check` lee una hoja de trabajo HAZOP —filas organizadas según los propios nombres de columna de la hoja, en chino o en inglés, más una cabecera opcional que declara el 分析对象— y comprueba la completitud y la trazabilidad interna de esa misma hoja: que cada fila rellene las columnas que exige su plantilla (`偏差` y `原因` por defecto), que cada fila registre su `节点`, que los `引导词` procedan de las tablas 1 y 2 de la norma o de la lista que el estudio declaró de antemano, que cada fila deje ver de qué elemento proviene la desviación, que el `风险等级` salga del vocabulario de riesgo de su organización, que la hoja identifique el objeto de análisis y que cada `偏差` sea literalmente el `工艺参数` leído a través de su `引导词`; toda comprobación que no pueda ejecutarse por falta de una columna se informa en `skipped` en lugar de pasar en silencio.
|
|
4
|
+
|
|
5
|
+
## Qué responde
|
|
6
|
+
|
|
7
|
+
| Usted pregunta | Qué responde |
|
|
8
|
+
|---|---|
|
|
9
|
+
| Una fila registra la desviación pero deja vacía la causa. ¿Se informa de ello? | Sí. `HZ-001` exige los campos que debe rellenar cada fila; sin configurar, recurre al par que la propia cláusula nombra, `偏差` y `原因`, de modo que un `原因` vacío ya es una falta por sí solo. Comprueba que la columna esté rellena, no que la lista de problemas esté completa ni que la causa sea técnicamente válida. |
|
|
10
|
+
| Tres filas no llevan nodo alguno. ¿Se dice algo y se juzga cómo se dividieron los nodos? | `HZ-002` informa de esas filas en una sola entrada y enumera sus números de fila, porque un registro sin nodos no permite generar la lista de nodos que pide la cláusula. Solo comprueba que `节点` esté relleno; no juzga si el grano del nodo es adecuado, porque la cláusula 4.2 no da criterio, ni decide si algún nodo quedó sin analizar. |
|
|
11
|
+
| Nuestro estudio escribió «相逆» en la columna `引导词`. ¿Se señalará? | `HZ-003` lo informa como palabra guía fuera de la lista: la norma dice «相反», no «相逆», y las tablas 1 y 2 aportan 无/多/少/伴随/部分/相反/异常 y 早/晚/先/后. Es un aviso y no un veredicto, porque una palabra guía definida y archivada por el estudio antes del análisis está permitida — por eso la regla se queda en `warn`. Una implantación puede declarar su propia lista y entonces solo se informa de lo que quede fuera de ella. |
|
|
12
|
+
| La columna `偏差` dice «无流量», pero `工艺参数` es «温度» y `引导词` es «无». ¿Se detecta? | `HZ-007` informa de la fila cuando el `偏差` escrito no contiene el `工艺参数` leído a través de su `引导词` en ninguno de los dos órdenes; los espacios y los separadores habituales (por ejemplo `+`, `、`, `/`, `-`, `—`, `的`, `:`) no cuentan, así que 流量无, 流量 + 无 y 无流量 coinciden. Solo se ejecuta si están las tres columnas —si no, figura en `skipped`— y un hallazgo suele indicar un copiado y pegado, no que la desviación sea técnicamente inválida. |
|
|
13
|
+
| La columna `风险等级` está rellena con «中», pero no hemos configurado ningún nivel de riesgo. ¿Qué devuelve? | `HZ-005` se informa a sí misma en `skipped`, no como un aprobado: la norma no fija escala de niveles de riesgo, así que los niveles deben venir de los criterios de riesgo de su organización y la lista de origen está vacía. Una vez configurados, solo comprueba que el valor figure en la lista, no si la calificación es correcta, y su severidad está topada en `info`. |
|
|
14
|
+
| La hoja no tiene ninguna línea que nombre la unidad analizada. ¿Es una falta? | `HZ-006` lo informa una vez, en el nivel superior: sin objeto de análisis, las conclusiones no se pueden remontar al límite que se analizó. La lista de cabecera en que se apoya procede de un anexo informativo —una sugerencia, no una obligación—, por eso la regla se queda en `warn` y `requireHeader: false` la desactiva para hojas que legítimamente no la llevan. |
|
|
15
|
+
|
|
16
|
+
## Normas que sigue
|
|
17
|
+
|
|
18
|
+
| Documento | Número | Reglas que lo citan |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| 《危险与可操作性分析(HAZOP分析)应用指南》 | GB/T 35320-2017 | HZ-001, HZ-002, HZ-003, HZ-004, HZ-005, HZ-006, HZ-007 |
|
|
21
|
+
| 《风险管理 风险评估技术》 | GB/T 27921-2023 | HZ-005 |
|
|
2
22
|
|
|
3
23
|
**Boundary:** this plugin checks one **HAZOP worksheet** for what a sheet can be held to — that every row
|
|
4
24
|
records the analysis content your template requires, that each 偏差 actually follows from the 工艺参数 and
|
package/README-hi.md
CHANGED
|
@@ -1,4 +1,24 @@
|
|
|
1
|
-
# dsh-hazplan-check
|
|
1
|
+
# dsh-hazplan-check — HAZOP वर्कशीट के तत्वों की पूर्णता और विचलन व्युत्पत्ति की संगति की जाँच
|
|
2
|
+
|
|
3
|
+
`dsh-hazplan-check` एक HAZOP वर्कशीट पढ़ता है — शीट के अपने कॉलम नामों पर आधारित पंक्तियाँ (चीनी या अंग्रेज़ी नाम, दोनों चलते हैं), साथ में विश्लेषण-वस्तु बताने वाला वैकल्पिक हेडर — और उसी शीट की पूर्णता तथा आंतरिक अनुरेखणीयता की जाँच करता है: क्या हर पंक्ति अपने टेम्पलेट में माँगे गए कॉलम भरती है (डिफ़ॉल्ट रूप से `偏差` और `原因`), क्या हर पंक्ति में `节点` दर्ज है, क्या `引导词` मानक की तालिका 1 और तालिका 2 से या अध्ययन द्वारा पहले घोषित सूची से लिए गए हैं, क्या हर पंक्ति से दिखता है कि विचलन किस तत्व से आया, क्या `风险等级` आपके संस्थान की जोखिम-शब्दावली से है, क्या शीट विश्लेषण-वस्तु को पहचानती है, और क्या हर `偏差` शब्दशः अपने `引导词` के माध्यम से पढ़ा गया `工艺参数` है; किसी कॉलम के अभाव में जो जाँच चल नहीं सकती, वह चुपचाप पास होने के बजाय `skipped` में दर्ज होती है।
|
|
4
|
+
|
|
5
|
+
## यह किन सवालों का जवाब देता है
|
|
6
|
+
|
|
7
|
+
| आपका सवाल | इसका जवाब |
|
|
8
|
+
|---|---|
|
|
9
|
+
| एक पंक्ति में विचलन दर्ज है पर कारण खाली है। क्या यह दर्ज होता है? | हाँ। `HZ-001` हर पंक्ति में अनिवार्य कॉलम भरे होने की अपेक्षा करता है; बिना कॉन्फ़िगर किए यह उसी जोड़ी पर लौट आता है जिसे धारा स्वयं नाम देती है — `偏差` और `原因` — इसलिए खाली `原因` अपने आप में एक कमी है। यह केवल देखता है कि कॉलम भरा है, यह नहीं कि समस्याओं की सूची पूरी है या कारण तकनीकी रूप से सही है। |
|
|
10
|
+
| तीन पंक्तियों में नोड ही नहीं है। क्या कुछ बताया जाता है, और नोड का बँटवारा कैसा है यह भी आँका जाता है? | `HZ-002` उन पंक्तियों को एक ही प्रविष्टि में दर्ज करता है और पंक्ति-संख्या गिनाता है, क्योंकि नोड रहित रिकॉर्ड से धारा में माँगी गई नोड-सूची बन ही नहीं सकती। यह केवल देखता है कि `节点` भरा है; नोड की बारीकी उचित है या नहीं, यह नहीं आँकता क्योंकि धारा 4.2 कोई कसौटी नहीं देती, और यह भी तय नहीं करता कि कोई नोड विश्लेषण से छूट गया है। |
|
|
11
|
+
| हमारे अध्ययन ने `引导词` कॉलम में «相逆» लिखा है। क्या यह दर्ज होगा? | `HZ-003` इसे सूची से बाहर का गाइड-शब्द बताकर दर्ज करता है: मानक का अपना शब्द «相反» है, «相逆» नहीं, और तालिका 1 व 2 ये देती हैं — 无/多/少/伴随/部分/相反/异常 और 早/晚/先/后। यह एक सूचना है, निर्णय नहीं, क्योंकि विश्लेषण से पहले परिभाषित और संग्रहित अपना गाइड-शब्द मान्य होता है — इसीलिए नियम `warn` पर रहता है। तैनाती अपनी सूची घोषित कर सकती है, और तब केवल उससे बाहर के शब्द दर्ज होते हैं। |
|
|
12
|
+
| `偏差` कॉलम में «无流量» लिखा है, पर `工艺参数` «温度» है और `引导词` «无»। क्या यह पकड़ में आता है? | `HZ-007` उस पंक्ति को दर्ज करता है जब लिखा हुआ `偏差` अपने `引导词` के माध्यम से पढ़े गए `工艺参数` को किसी भी क्रम में नहीं रखता; खाली स्थान और सामान्य संयोजक (जैसे `+`, `、`, `/`, `-`, `—`, `的`, `:`) नहीं गिने जाते, इसलिए 流量无, 流量 + 无 और 无流量 तीनों मेल खाते हैं। यह केवल तब चलता है जब तीनों कॉलम मौजूद हों — वरना यह `skipped` में दिखता है — और मेल मिलना आम तौर पर कॉपी-पेस्ट की गड़बड़ बताता है, यह नहीं कि विचलन तकनीकी रूप से गलत है। |
|
|
13
|
+
| `风险等级` कॉलम में «中» भरा है, पर हमने कोई जोखिम-स्तर कॉन्फ़िगर नहीं किया। जवाब में क्या आएगा? | `HZ-005` स्वयं को `skipped` में दर्ज करता है, पास के रूप में नहीं: मानक जोखिम-स्तर का कोई पैमाना तय नहीं करता, इसलिए स्तर आपके संस्थान के जोखिम-मानदंड से आने चाहिए और छोड़ी गई सूची खाली है। कॉन्फ़िगर करने के बाद यह केवल देखता है कि मान सूची में है, यह नहीं कि वर्गीकरण सही है, और इसकी गंभीरता `info` तक सीमित है। |
|
|
14
|
+
| शीट में कहीं भी विश्लेषण-वस्तु (इकाई) का नाम नहीं है। क्या यह कमी है? | `HZ-006` इसे एक बार, शीर्ष स्तर पर दर्ज करता है: विश्लेषण-वस्तु के बिना निष्कर्ष उस सीमा तक वापस नहीं जोड़े जा सकते जिसका विश्लेषण हुआ। जिस हेडर-सूची पर यह टिका है वह सूचनात्मक परिशिष्ट से आती है — सुझाव, बाध्यता नहीं — इसीलिए नियम `warn` पर रहता है, और जिन शीटों में वह वस्तुतः नहीं होती उनके लिए `requireHeader: false` इसे बंद कर देता है। |
|
|
15
|
+
|
|
16
|
+
## यह किन मानकों पर आधारित है
|
|
17
|
+
|
|
18
|
+
| दस्तावेज़ | संख्यांक | इन्हें उद्धृत करने वाले नियम |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| 《危险与可操作性分析(HAZOP分析)应用指南》 | GB/T 35320-2017 | HZ-001, HZ-002, HZ-003, HZ-004, HZ-005, HZ-006, HZ-007 |
|
|
21
|
+
| 《风险管理 风险评估技术》 | GB/T 27921-2023 | HZ-005 |
|
|
2
22
|
|
|
3
23
|
**Boundary:** this plugin checks one **HAZOP worksheet** for what a sheet can be held to — that every row
|
|
4
24
|
records the analysis content your template requires, that each 偏差 actually follows from the 工艺参数 and
|
package/README-pt.md
CHANGED
|
@@ -1,4 +1,24 @@
|
|
|
1
|
-
# dsh-hazplan-check
|
|
1
|
+
# dsh-hazplan-check — Verificação da completude dos elementos de uma folha de trabalho HAZOP e da coerência na derivação dos desvios
|
|
2
|
+
|
|
3
|
+
`dsh-hazplan-check` lê uma folha de trabalho HAZOP —linhas organizadas pelos próprios nomes de coluna da folha, em chinês ou em inglês, mais um cabeçalho opcional que declara o 分析对象— e verifica a completude e a rastreabilidade interna dessa mesma folha: se cada linha preenche as colunas exigidas pelo seu modelo (`偏差` e `原因` por omissão), se cada linha regista o seu `节点`, se os `引导词` vêm das tabelas 1 e 2 da norma ou da lista que o estudo declarou antecipadamente, se cada linha deixa ver de que elemento veio o desvio, se o `风险等级` sai do vocabulário de risco da sua organização, se a folha identifica o objeto de análise e se cada `偏差` é literalmente o `工艺参数` lido através do seu `引导词`; qualquer verificação que não possa correr por falta de uma coluna é reportada em `skipped` em vez de passar em silêncio.
|
|
4
|
+
|
|
5
|
+
## O que ele responde
|
|
6
|
+
|
|
7
|
+
| Você pergunta | O que ele responde |
|
|
8
|
+
|---|---|
|
|
9
|
+
| Uma linha regista o desvio mas deixa a causa em branco. Isso é reportado? | Sim. `HZ-001` exige os campos que cada linha tem de preencher; sem configuração, recorre ao par que a própria cláusula nomeia, `偏差` e `原因`, pelo que um `原因` em branco já é uma falha por si. Verifica que a coluna está preenchida, não que a lista de problemas esteja completa nem que a causa seja tecnicamente válida. |
|
|
10
|
+
| Três linhas não têm nó nenhum. Isso é dito, e avalia-se como os nós foram divididos? | `HZ-002` reporta essas linhas num único registo e enumera os números de linha, porque um registo sem nós não permite gerar a lista de nós que a cláusula pede. Só verifica que `节点` está preenchido; não julga se a granularidade do nó é adequada, porque a cláusula 4.2 não dá critério, nem decide se algum nó ficou por analisar. |
|
|
11
|
+
| O nosso estudo escreveu «相逆» na coluna `引导词`. Isso será assinalado? | `HZ-003` reporta-o como palavra-guia fora da lista: a norma escreve «相反», não «相逆», e as tabelas 1 e 2 fornecem 无/多/少/伴随/部分/相反/异常 e 早/晚/先/后. É um aviso e não um veredicto, porque uma palavra-guia definida e arquivada pelo estudo antes da análise é permitida — é por isso que a regra fica em `warn`. Uma instalação pode declarar a sua própria lista, e então só o que ficar fora dela é reportado. |
|
|
12
|
+
| A coluna `偏差` diz «无流量», mas `工艺参数` é «温度» e `引导词` é «无». Isso é detetado? | `HZ-007` reporta a linha quando o `偏差` escrito não contém o `工艺参数` lido através do seu `引导词` em nenhuma das duas ordens; espaços e os separadores habituais (por exemplo `+`, `、`, `/`, `-`, `—`, `的`, `:`) não contam, pelo que 流量无, 流量 + 无 e 无流量 coincidem. Só corre quando as três colunas existem —caso contrário aparece em `skipped`— e um achado costuma indicar um copiar-colar, não que o desvio seja tecnicamente inválido. |
|
|
13
|
+
| A coluna `风险等级` está preenchida com «中», mas nunca configurámos níveis de risco. O que vem na resposta? | `HZ-005` reporta-se a si própria em `skipped`, e não como aprovada: a norma não fixa uma escala de níveis de risco, por isso os níveis têm de vir dos critérios de risco da sua organização e a lista de origem está vazia. Depois de configurados, só verifica se o valor consta da lista, não se a classificação está correta, e a sua severidade está limitada a `info`. |
|
|
14
|
+
| A folha não tem nenhuma linha que nomeie a unidade analisada. É uma falha? | `HZ-006` reporta-o uma vez, ao nível superior: sem objeto de análise, as conclusões não se conseguem remontar à fronteira analisada. A lista de cabeçalho em que se apoia vem de um anexo informativo —uma sugestão, não uma obrigação—, por isso a regra fica em `warn` e `requireHeader: false` desativa-a para folhas que legitimamente não a tenham. |
|
|
15
|
+
|
|
16
|
+
## Normas que segue
|
|
17
|
+
|
|
18
|
+
| Documento | Número | Regras que o citam |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| 《危险与可操作性分析(HAZOP分析)应用指南》 | GB/T 35320-2017 | HZ-001, HZ-002, HZ-003, HZ-004, HZ-005, HZ-006, HZ-007 |
|
|
21
|
+
| 《风险管理 风险评估技术》 | GB/T 27921-2023 | HZ-005 |
|
|
2
22
|
|
|
3
23
|
**Boundary:** this plugin checks one **HAZOP worksheet** for what a sheet can be held to — that every row
|
|
4
24
|
records the analysis content your template requires, that each 偏差 actually follows from the 工艺参数 and
|
package/README-zh.md
CHANGED
|
@@ -1,4 +1,24 @@
|
|
|
1
|
-
# dsh-hazplan-check
|
|
1
|
+
# dsh-hazplan-check — HAZOP 分析表要素齐备性与偏差推导一致性核对
|
|
2
|
+
|
|
3
|
+
`dsh-hazplan-check` 读取一份 HAZOP 分析表——按表格自身的列名组织的行(中英文列名均可),加上可选的、写明分析对象的表头——核对这份表格自身的齐备与可追溯:每行是否填了模板要求的栏目(默认 `偏差` 与 `原因`)、每行是否写明 `节点`、`引导词` 是否取自标准表1与表2或本分析事先声明的清单、每行是否看得出偏差来自哪个要素、`风险等级` 是否出自本机构的风险档位、表头能否识别分析对象、以及每个 `偏差` 是否字面上等于 `工艺参数` 与 `引导词` 的组合;因缺列而无法执行的核对会出现在 `skipped` 里,而不是静默通过。
|
|
4
|
+
|
|
5
|
+
## 它回答什么问题
|
|
6
|
+
|
|
7
|
+
| 你会问 | 它怎么答 |
|
|
8
|
+
|---|---|
|
|
9
|
+
| 某行填了偏差,但原因栏空着,会被报出吗? | 会。`HZ-001` 要求每行填写必填栏目;出厂未配置 `requiredFields` 时,回退到条款本身点名的一对:`偏差` 与 `原因`,所以 `原因` 空着本身就是缺项。它只核对栏目是否填写,不判断问题是否找全、原因是否成立。 |
|
|
10
|
+
| 有三行根本没有写节点,会被指出来吗?节点划分得粗或细,它会不会评价? | `HZ-002` 会把这几行合并报出一条,并列出所在行号,因为记录没有节点就生成不了条款要求的节点清单。它只核对 `节点` 是否填写;节点划分粒度是否恰当,它不判断(4.2 没有判据),也不判断有没有节点被漏掉未作分析。 |
|
|
11
|
+
| 我们的分析在 `引导词` 栏里写了「相逆」,会被提示吗? | `HZ-003` 会把它作为清单之外的引导词报出:国标自己的用词是「相反」而不是「相逆」,表1与表2给出的是 无/多/少/伴随/部分/相反/异常 与 早/晚/先/后。这条只是提示而不断定不合规——6.4.3 允许自定义引导词,只要分析前已定义并存档,所以本条为 `warn`。部署时也可以换成自己的清单,那时只有清单之外的词会被报出。 |
|
|
12
|
+
| `偏差` 栏写的是「无流量」,而 `工艺参数` 是「温度」、`引导词` 是「无」,这能查出来吗? | 能。`HZ-007` 在写下的 `偏差` 不包含 `工艺参数` 与 `引导词` 的组合(两种语序都算)时报出该行;空白与常见连接符(如 `+`、`、`、`/`、`-`、`—`、`的`、`:`)忽略不计,所以「流量无」「流量 + 无」「无流量」都算相符。它只在三列同时具备时执行,否则出现在 `skipped` 里;命中通常意味着复制粘贴串行,不代表该偏差在工艺上不成立。 |
|
|
13
|
+
| `风险等级` 栏填了「中」,但我们没有配置任何风险档位,会怎样? | `HZ-005` 会把自己报进 `skipped`,而不是当作通过:标准未规定风险等级的刻度,档位必须来自本机构的风险准则,出厂清单是空的。配置之后,它只核对所填值是否在册,不判断定级是否正确;本条严重级封顶为 `info`。 |
|
|
14
|
+
| 分析表里没有任何一行写明所分析的对象(装置或单元),算缺项吗? | `HZ-006` 会在顶层报出一条:没有分析对象,结论就无法追溯到被分析的边界。它依据的表头项来自资料性附录——是建议而不是强制——所以本条停在 `warn`;确实不带表头的表格可用 `requireHeader: false` 停用本条。 |
|
|
15
|
+
|
|
16
|
+
## 依据的标准
|
|
17
|
+
|
|
18
|
+
| 文件 | 文号 | 引用它的规则 |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| 《危险与可操作性分析(HAZOP分析)应用指南》 | GB/T 35320-2017 | HZ-001, HZ-002, HZ-003, HZ-004, HZ-005, HZ-006, HZ-007 |
|
|
21
|
+
| 《风险管理 风险评估技术》 | GB/T 27921-2023 | HZ-005 |
|
|
2
22
|
|
|
3
23
|
**Boundary:** this plugin checks one **HAZOP worksheet** for what a sheet can be held to — that every row
|
|
4
24
|
records the analysis content your template requires, that each 偏差 actually follows from the 工艺参数 and
|
package/README.md
CHANGED
|
@@ -1,4 +1,24 @@
|
|
|
1
|
-
# dsh-hazplan-check
|
|
1
|
+
# dsh-hazplan-check — HAZOP worksheet element completeness and deviation derivation consistency check
|
|
2
|
+
|
|
3
|
+
`dsh-hazplan-check` reads one HAZOP worksheet — rows keyed by the sheet's own column names, in Chinese or English, plus an optional header naming the 分析对象 — and checks that same sheet's completeness and internal traceability: that every row fills the fields your template requires (`偏差` and `原因` by default), that each row records its `节点`, that `引导词` come from the standard's tables 1 and 2 or from the list the study declared beforehand, that each row shows which element its deviation came from, that `风险等级` come from your own risk vocabulary, that the sheet names its analysis subject, and that every `偏差` is literally the `工艺参数` read through its `引导词`; a check that cannot run for want of a column is reported in `skipped` rather than passing silently.
|
|
4
|
+
|
|
5
|
+
## What it answers
|
|
6
|
+
|
|
7
|
+
| You ask | What it answers |
|
|
8
|
+
|---|---|
|
|
9
|
+
| A row records the deviation but leaves the cause blank. Is that reported? | Yes. `HZ-001` requires the fields every row must fill; shipped unset, it falls back to the pair the clause itself names, `偏差` and `原因`, so a blank `原因` is a gap on its own. It checks that the column is filled, not that the problem list is complete or the cause technically sound. |
|
|
10
|
+
| Three rows carry no node at all. Does the check say anything, and does it judge how the nodes were divided? | `HZ-002` reports those rows together and lists their row numbers, because a record without nodes cannot produce the node list the clause asks for. It checks only that `节点` is filled; it does not judge whether the node granularity is right, since clause 4.2 gives no criterion for it, and it does not decide whether any node was left unanalysed. |
|
|
11
|
+
| Our study wrote 相逆 in the `引导词` column. Will that be flagged? | `HZ-003` reports it as a guide word outside the list: the standard's own wording is 「相反」, not 相逆, and tables 1 and 2 supply 无/多/少/伴随/部分/相反/异常 and 早/晚/先/后. The finding is a prompt rather than a verdict, because a guide word the study defined and archived before the analysis is permitted — which is why the rule sits at `warn`. A deployment can declare its own list instead, and then only words outside that list are reported. |
|
|
12
|
+
| The `偏差` column reads 无流量, while `工艺参数` says 温度 and `引导词` says 无. Is that caught? | `HZ-007` reports the row when the written `偏差` does not contain the `工艺参数` read through its `引导词` in either word order; blanks and the usual separators (for example `+`, `、`, `/`, `-`, `—`, `的`, `:`) are ignored, so 流量无, 流量 + 无 and 无流量 all agree. It runs only when all three columns are present — otherwise it appears in `skipped` — and a hit means a likely copy-paste artefact, not that the deviation is technically wrong. |
|
|
13
|
+
| The `风险等级` column is filled with 中, but we never configured a risk vocabulary. What comes back? | `HZ-005` reports itself in `skipped`, not as a pass: the standard fixes no risk-level scale, so the levels have to come from your own risk criteria and the shipped list is empty. Once levels are configured it only checks that the value is in the list, not whether the rating is correct, and its severity is capped at `info`. |
|
|
14
|
+
| The worksheet has no line naming the unit it analyses. Is that a gap? | `HZ-006` reports it once, at the top level: without an analysis subject the conclusions cannot be traced back to the boundary that was analysed. The header list it rests on comes from an informative appendix — a suggestion, not a requirement — so the rule stays at `warn`, and `requireHeader: false` turns it off for sheets that legitimately carry none. |
|
|
15
|
+
|
|
16
|
+
## Standards it follows
|
|
17
|
+
|
|
18
|
+
| Document | Number | Cited by rules |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| 《危险与可操作性分析(HAZOP分析)应用指南》 | GB/T 35320-2017 | HZ-001, HZ-002, HZ-003, HZ-004, HZ-005, HZ-006, HZ-007 |
|
|
21
|
+
| 《风险管理 风险评估技术》 | GB/T 27921-2023 | HZ-005 |
|
|
2
22
|
|
|
3
23
|
**Boundary:** this plugin checks one **HAZOP worksheet** for what a sheet can be held to — that every row
|
|
4
24
|
records the analysis content your template requires, that each 偏差 actually follows from the 工艺参数 and
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Reporting a vulnerability
|
|
4
|
+
|
|
5
|
+
Please report security vulnerabilities **privately** through GitHub's private
|
|
6
|
+
vulnerability reporting:
|
|
7
|
+
|
|
8
|
+
**Security → Report a vulnerability** at
|
|
9
|
+
https://github.com/PerryLink/dsh-hazplan-check/security/advisories/new
|
|
10
|
+
|
|
11
|
+
Do **not** open a public issue for security findings.
|
|
12
|
+
|
|
13
|
+
Before reporting, **sanitize everything you paste**: remove tokens, API keys,
|
|
14
|
+
credentials, authorization headers, session contents, and personal data. Logs
|
|
15
|
+
without secrets only.
|
|
16
|
+
|
|
17
|
+
## Scope note
|
|
18
|
+
|
|
19
|
+
This plugin is an offline checker. It reads the material you hand it and
|
|
20
|
+
compares it against a versioned rule pack; it makes no network calls and no
|
|
21
|
+
model calls, and it stores nothing.
|
|
22
|
+
|
|
23
|
+
## What to include
|
|
24
|
+
|
|
25
|
+
- affected package version (and DeepSeek Harness runtime version)
|
|
26
|
+
- a minimal reproduction
|
|
27
|
+
- your impact assessment
|
|
28
|
+
|
|
29
|
+
## Response expectations
|
|
30
|
+
|
|
31
|
+
- acknowledgement within **7 days**
|
|
32
|
+
- status updates at least every **14 days** until resolution
|
|
33
|
+
- coordinated disclosure: the fix and advisory are prepared first; the finding
|
|
34
|
+
is disclosed publicly after the fix ships
|
|
35
|
+
|
|
36
|
+
## Credits and disclosure
|
|
37
|
+
|
|
38
|
+
- reporters are credited in the advisory and CHANGELOG unless they ask to stay anonymous
|
|
39
|
+
- advisories follow GitHub's advisory workflow and are published together with the fix
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-hazplan-check",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "HAZOP 分析表要素齐备性与偏差推导一致性核对(依据公开的危险与可操作性分析标准,仅提示差异,不作出定性结论)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.mjs",
|
|
@@ -23,7 +23,9 @@
|
|
|
23
23
|
"README-hi.md",
|
|
24
24
|
"locale/*.json",
|
|
25
25
|
"icon.svg",
|
|
26
|
-
"rules"
|
|
26
|
+
"rules",
|
|
27
|
+
"CHANGELOG.md",
|
|
28
|
+
"SECURITY.md"
|
|
27
29
|
],
|
|
28
30
|
"scripts": {
|
|
29
31
|
"build": "tsdown",
|
|
@@ -32,7 +34,7 @@
|
|
|
32
34
|
"verify:self-contained": "node scripts/verify-self-contained.mjs",
|
|
33
35
|
"check:lockfile": "node scripts/check-lockfile-drift.mjs",
|
|
34
36
|
"check:readmes": "node scripts/check-readme-sync.mjs",
|
|
35
|
-
"prepublishOnly": "pnpm run typecheck && pnpm test && pnpm run build && pnpm run verify:self-contained && pnpm run check:readmes && pnpm run check:citations",
|
|
37
|
+
"prepublishOnly": "pnpm run typecheck && pnpm test && pnpm run build && pnpm run verify:self-contained && pnpm run check:lockfile && pnpm run check:readmes && pnpm run check:citations",
|
|
36
38
|
"prepare": "tsdown",
|
|
37
39
|
"check:citations": "node scripts/check-citations.mjs"
|
|
38
40
|
},
|