Installations
npm install bpmnlint
Score
90.8
Supply Chain
97.6
Quality
87
Maintenance
100
Vulnerability
100
License
Developer
bpmn-io
Developer Guide
Module System
CommonJS
Min. Node Version
>= 16
Typescript Support
No
Node Version
20.11.1
NPM Version
10.2.4
Statistics
125 Stars
516 Commits
37 Forks
12 Watching
7 Branches
17 Contributors
Updated on 01 Nov 2024
Bundle Size
9.14 kB
Minified
3.04 kB
Minified + Gzipped
Languages
JavaScript (100%)
Total Downloads
Cumulative downloads
Total Downloads
1,344,054
Last day
-29.5%
2,356
Compared to previous day
Last week
0.9%
14,537
Compared to previous week
Last month
-13.3%
65,657
Compared to previous month
Last year
65.6%
586,380
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
bpmnlint
Validate your BPMN diagrams based on configurable lint rules.
Installation
Install the utility via npm:
1npm install -g bpmnlint
Usage
Validate your diagrams via the commandline:
1> bpmnlint invoice.bpmn 2 3/Projects/process-application/resources/invoice.bpmn 4 Flow_1 error Sequence flow is missing condition conditional-flows 5 Process error Process is missing end event end-event-required 6 Task_13 warning Element is missing label/name label-required 7 Event_12 warning Element is missing label/name label-required 8 Event_27 warning Element is missing label/name label-required 9 Process error Process is missing start event start-event-required 10 11✖ 6 problems (6 errors, 0 warnings)
Rules
Our documentation lists all currenty implemented rules, the ./rules
folder contains each rules implementation.
Do you miss a rule that should be included? Propose a new rule.
Configuration
Create a .bpmnlintrc
file in your working directory and inherit from a common configuration using the extends
block:
1{ 2 "extends": "bpmnlint:recommended" 3}
Add or customize rules using the rules
block:
1{ 2 "extends": "bpmnlint:recommended", 3 "rules": { 4 "label-required": "off" 5 } 6}
API
Invoke the tool directly from NodeJS:
1import Linter from 'bpmnlint'; 2import NodeResolver from 'bpmnlint/lib/resolver/node-resolver'; 3 4import BpmnModdle from 'bpmn-moddle'; 5 6const moddle = new BpmnModdle(); 7 8const linter = new Linter({ 9 config: { 10 extends: 'bpmnlint:recommended' 11 }, 12 resolver: new NodeResolver() 13}); 14 15const xmlStr = ` 16 <?xml version="1.0" encoding="UTF-8"?> 17 <bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" 18 id="definitions" 19 targetNamespace="http://bpmn.io/schema/bpmn"> 20 <bpmn:process id="process" /> 21 </bpmn:definitions> 22`; 23 24const { 25 rootElement: definitions 26} = await moddle.fromXML(xmlStr); 27 28const reports = linter.lint(definitions); 29 30// { 31// "end-event-required": [ 32// { 33// "id": "process", 34// "message": "Process is missing end event" 35// } 36// ], 37// ... 38// }
Writing a Plug-in
Create your first plug-in using the plugin creator:
1npm init bpmnlint-plugin {PLUGIN_NAME}
Checkout the bpmnlint-plugin-example for details on how to define, test, and consume custom lint rules. Use the bpmnlint playground to implement new rules with quick visual feedback.
Bundling
For browser usage include your linting configuration using your favorite bundler plug-in (Rollup, Webpack).
Visual Feedback
Integrate the linter via bpmn-js-bpmnlint into bpmn-js and get direct feedback during modeling.
To try out visual validation, checkout the bpmnlint playground.
Related
- bpmnlint-plugin-example - an example plug-in
- bpmnlint-playground - a playground to implement new rules with quick visual feedback
- bpmnlint-generate-docs-images - Generate images for your bpmnlint documentation
- bpmn-js-bpmnlint - integration into bpmn-js
License
MIT
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
20 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
no binaries found in the repo
Reason
security policy file detected
Details
- Info: security policy file detected: github.com/bpmn-io/.github/SECURITY.md:1
- Info: Found linked content: github.com/bpmn-io/.github/SECURITY.md:1
- Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/bpmn-io/.github/SECURITY.md:1
- Info: Found text in security policy: github.com/bpmn-io/.github/SECURITY.md:1
Reason
dependency not pinned by hash detected -- score normalized to 6
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/bpmn-io/bpmnlint/CI.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/bpmn-io/bpmnlint/CI.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/CI.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/bpmn-io/bpmnlint/CI.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/bpmn-io/bpmnlint/CI.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/bpmn-io/bpmnlint/CI.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI.yml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/bpmn-io/bpmnlint/CI.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI.yml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/bpmn-io/bpmnlint/CI.yml/main?enable=pin
- Info: 0 out of 6 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 third-party GitHubAction dependencies pinned
- Info: 3 out of 3 npmCommand dependencies pinned
Reason
Found 7/20 approved changesets -- score normalized to 3
Reason
9 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-7q7g-4xm8-89cq
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22
- Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp
- Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
- Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/CI.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'main'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 19 are checked with a SAST tool
Score
4.8
/10
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More