UNPKG

add-vulnerabilities-to-bom

Version:

Adds known vulnerabilities to BOM

291 lines (290 loc) 7.96 kB
{ "name": "add-vulnerabilities-to-bom", "homepage": "https://gitlab.com/kabo/add-vulnerabilities-to-bom", "bugs": "https://gitlab.com/kabo/add-vulnerabilities-to-bom/-/issues", "repository": "gitlab:kabo/add-vulnerabilities-to-bom", "version": "0.0.3", "description": "Adds known vulnerabilities to BOM", "main": "index.js", "types": "index.d.ts", "bin": { "add-vulnerabilities-to-bom": "cli.js" }, "keywords": [ "cyclonedx", "bom", "sbom", "bill of materials", "software bill of materials", "software bom", "audit", "vulnerabilities", "vulnerability" ], "license": "MIT", "private": false, "author": { "name": "Calle Kabo, KaboHub", "email": "calle@kabohub.co.nz", "url": "https://kabohub.co.nz/" }, "scripts": { "auditci": "audit-ci --moderate", "bom": "cyclonedx-bom -o bom.json --include-dev", "cli": "ts-node ./src/cli.ts", "check-license": "license-checker --summary --production --onlyAllow 'MIT;BSD-2-Clause;ISC'", "chmodfix": "chmod a+x dist/cli.js", "depcheck": "depcheck . --ignores=depcheck,ts-node,monocle-ts,newtype-ts,eslint-*,@types/*", "jest": "jest --detectOpenHandles", "jest-ci": "jest --ci --runInBand", "lint": "eslint 'src/**/*.ts' 'test/**/*.ts'", "lint-ci": "eslint 'src/**/*.ts' 'test/**/*.ts' -f json -o eslint-report.json", "lint-staged": "lint-staged", "test": "npm-run-all --aggregate-output -p depcheck auditci check-license lint -s jest", "test-ci": "npm-run-all -s depcheck auditci check-license lint-ci jest-ci bom", "test-precommit": "npm-run-all --aggregate-output -p depcheck auditci check-license lint-staged -s jest", "test-watch": "jest --detectOpenHandles --watch", "clean": "rm -rf ./dist", "build-esbuild": "esbuild --bundle --outfile=dist/index.js --minify --platform=node --target=node14 --main-fields=module,main src/index.ts", "build-esbuild-cli": "esbuild --bundle --outfile=dist/cli.js --minify --platform=node --target=node14 --banner:js='#!/usr/bin/env node' --external:./index src/cli.ts", "build-types": "tsc --emitDeclarationOnly && rm -f dist/*.d.ts && rm -rf dist/test/ && mv dist/src/index.d.ts dist/ && rm -rf dist/src/", "build": "npm-run-all -s clean build-types build-esbuild build-esbuild-cli chmodfix", "prerelease": "yarn test && yarn build", "copy-to-dist": "cp package.json dist/ && cp *.md dist/ && cp .npmignore dist/", "release": "standard-version --no-verify" }, "dependencies": {}, "devDependencies": { "@cyclonedx/bom": "^3.8.0", "@relmify/jest-fp-ts": "^2.0.1", "@types/jest": "^27.4.1", "@types/node": "^17.0.30", "@types/yargs": "^17.0.10", "@typescript-eslint/eslint-plugin": "^5.20.0", "@typescript-eslint/parser": "^5.20.0", "audit-ci": "^6.2.0", "compare-versions": "^4.1.3", "cross-fetch": "^3.1.5", "depcheck": "^1.4.3", "esbuild": "^0.14.38", "eslint": "^8.14.0", "eslint-config-standard": "^17.0.0", "eslint-config-standard-pure-fp": "^2.0.1", "eslint-config-standard-with-typescript": "^21.0.1", "eslint-plugin-better": "^0.1.5", "eslint-plugin-fp": "^2.3.0", "eslint-plugin-import": "^2.25.2", "eslint-plugin-n": "^15.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^6.0.0", "eslint-plugin-security": "^1.5.0", "eslint-plugin-security-node": "^1.1.1", "eslint-plugin-sonarjs": "^0.13.0", "eslint-plugin-standard": "^5.0.0", "fp-fetch": "^0.1.1", "fp-ts": "^2.12.1", "fp-ts-std": "^0.13.1", "husky": "^4.3.8", "io-ts": "^2.2.16", "jest": "27", "jest-sonar-reporter": "^2.0.0", "license-checker": "^25.0.1", "lint-staged": "^12.3.8", "monocle-ts": "^2.3.13", "newtype-ts": "^0.3.5", "npm-run-all": "^4.1.5", "spectacles-ts": "^1.0.7", "standard-version": "^9.3.2", "ts-jest": "^27.1.4", "ts-node": "^10.7.0", "typescript": "^4.6.4", "yargs": "^17.4.1" }, "standard-version": { "scripts": { "prerelease": "yarn prerelease", "postchangelog": "yarn copy-to-dist", "posttag": "echo 'Now run cd dist/ && yarn publish && cd ../ && git push --follow-tags origin master'" } }, "eslintConfig": { "parser": "@typescript-eslint/parser", "parserOptions": { "project": "./tsconfig.json", "ecmaVersion": 2020 }, "plugins": [ "@typescript-eslint", "security", "security-node", "sonarjs" ], "extends": [ "eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:security/recommended", "plugin:security-node/recommended", "plugin:sonarjs/recommended", "standard-pure-fp" ], "rules": { "@typescript-eslint/no-explicit-any": 0, "@typescript-eslint/no-non-null-assertion": 0, "better/no-new": 0, "@typescript-eslint/no-unused-vars": [ "error", { "argsIgnorePattern": "^_$" } ], "array-bracket-spacing": [ "error", "always" ], "array-callback-return": 2, "comma-dangle": [ "error", { "arrays": "always-multiline", "objects": "always-multiline", "imports": "only-multiline", "functions": "only-multiline", "exports": "only-multiline" } ], "complexity": [ "error", { "max": 5 } ], "computed-property-spacing": [ "error", "always" ], "fp/no-rest-parameters": "off", "indent": [ "error", 2, { "ignoreComments": true, "SwitchCase": 1, "flatTernaryExpressions": true, "offsetTernaryExpressions": true } ], "max-depth": [ "error", { "max": 2 } ], "max-lines": [ "error", { "max": 500 } ], "max-lines-per-function": [ "error", { "max": 25 } ], "max-nested-callbacks": [ "error", { "max": 2 } ], "max-statements": [ "error", { "max": 5 } ], "max-statements-per-line": [ "error", { "max": 1 } ], "no-eval": 2, "no-multi-spaces": [ "error", { "ignoreEOLComments": true } ], "no-return-assign": 2, "no-param-reassign": 2, "no-var": 2, "quotes": [ "error", "single", { "allowTemplateLiterals": true } ], "security-node/detect-crlf": "off", "prefer-const": 2, "one-var": "off", "no-unused-vars": "off", "no-console": "off" } }, "husky": { "hooks": { "pre-commit": "yarn test-precommit" } }, "lint-staged": { "*.ts": [ "eslint" ] }, "jest": { "collectCoverage": true, "collectCoverageFrom": [ "src/**/*.ts", "!src/cli.ts", "!src/side-effects/**/*.ts" ], "coverageDirectory": "coverage", "coverageReporters": [ "lcov", "text" ], "coverageThreshold": { "global": { "branches": 60, "functions": 50, "lines": 90, "statements": 80 } }, "transform": { "^.+\\.ts$": "ts-jest" }, "moduleNameMapper": { "fp-ts-std/(.*)": "fp-ts-std/dist/cjs/$1" }, "modulePathIgnorePatterns": [ "<rootDir>/dist" ], "setupFilesAfterEnv": [ "@relmify/jest-fp-ts" ], "testRegex": "(/test/.*|(\\.|/)(test|spec))\\.(js|ts)$", "testResultsProcessor": "jest-sonar-reporter", "testPathIgnorePatterns": [ "/dist/" ], "moduleFileExtensions": [ "ts", "js", "json", "node" ] } }