{"name":"jscpd-sarif-reporter","version":"4.2.1","keywords":["jscpd","cpd","reporter","jscpd-reporter","sarif"],"author":{"name":"Andrey Kucherenko","email":"kucherenko.andrey@gmail.com"},"license":"MIT","_id":"jscpd-sarif-reporter@4.2.1","maintainers":[{"name":"apk","email":"kucherenko.andrey@gmail.com"}],"homepage":"https://github.com/kucherenko/jscpd#readme","bugs":{"url":"https://github.com/kucherenko/jscpd/issues"},"dist":{"shasum":"6b35af81ed184dd2306db633b09e9e0492c387e6","tarball":"http://registry-npm.ywwl.com/jscpd-sarif-reporter/download/jscpd-sarif-reporter-4.2.1.tgz","fileCount":9,"integrity":"sha512-I92oQOGS92Ch2YRiSVBLuzvZJmXeAyLd4RQc7xxFyXD3VI2Iq+sRwkeii43mOgH7mGNXAs7cjTey6PwKMmFjZg==","signatures":[{"sig":"MEUCIQCi0unFhYNxFjRogSWCkuKmH0o5ZWO71dY7Ndt//7JHAAIgBpRB8QQyYXXJSZ/mj74jMjdveThszBIx00idJdtTEfw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23603,"size":5493,"noattachment":false,"key":"/jscpd-sarif-reporter/-/jscpd-sarif-reporter-4.2.1.tgz"},"main":"dist/index.js","_from":"file:jscpd-sarif-reporter-4.2.1.tgz","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./README.md":"./README.md"},"private":false,"scripts":{"dev":"nodemon","build":"tsup-node --dts","cleanup":"rimraf ./dist .turbo","test:dev":"vitest","typecheck":"tsc"},"typings":"dist/index.d.mts","_npmUser":{"name":"apk","email":"kucherenko.andrey@gmail.com"},"_resolved":"/private/var/folders/rh/82vm3q314snd3ymwr5n577_00000gp/T/4098c777b7f38a230df54993d0341726/jscpd-sarif-reporter-4.2.1.tgz","_integrity":"sha512-I92oQOGS92Ch2YRiSVBLuzvZJmXeAyLd4RQc7xxFyXD3VI2Iq+sRwkeii43mOgH7mGNXAs7cjTey6PwKMmFjZg==","repository":{"url":"git+ssh://git@github.com/kucherenko/jscpd.git","type":"git"},"_npmVersion":"11.12.1","description":"Reporter for jscpd. Generate a report in SARIF format (https://github.com/oasis-tcs/sarif-spec).","directories":{"src":"src","test":"__tests__"},"_nodeVersion":"26.0.0","dependencies":{"colors":"^1.4.0","fs-extra":"^11.2.0","node-sarif-builder":"^3.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","vitest":"^3.2.4","nodemon":"^3.1.4","typescript":"^5.5.4","@jscpd/core":"4.2.1","@types/node":"^22.5.2","@jscpd/finder":"4.2.1","@jscpd/tsconfig":"5.2.1","@types/fs-extra":"^11.0.4"},"_npmOperationalInternal":{"tmp":"tmp/jscpd-sarif-reporter_4.2.1_1778851971322_0.6855083035286684","host":"s3://npm-registry-packages-npm-production"},"readme":"# `@jscpd/sarif-reporter`\n\n> SARIF reporter for [jscpd](https://github.com/kucherenko/jscpd) — generates Static Analysis Results Interchange Format output for integration with GitHub Code Scanning and other SARIF-compatible tools.\n\nEach detected clone is reported as a `warning`-level SARIF result with precise file locations (line and column). If the overall duplication percentage exceeds the configured `--threshold`, an additional `error`-level result is emitted under the `duplications-threshold` rule.\n\nOutput file: `<output-dir>/jscpd-sarif.json`\n\n## Installation\n\n```bash\nnpm install @jscpd/sarif-reporter\n```\n\n## Usage\n\n```bash\njscpd --reporters sarif --output ./reports /path/to/source\n```\n\n## GitHub Code Scanning integration\n\nUpload the SARIF output to GitHub to surface duplication findings inline in pull requests:\n\n```yaml\n# .github/workflows/jscpd.yml\nname: Code duplication check\non: [push, pull_request]\n\njobs:\n  jscpd:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n\n      - name: Run jscpd\n        run: npx jscpd --reporters sarif --output ./reports .\n\n      - name: Upload SARIF to GitHub Code Scanning\n        uses: github/codeql-action/upload-sarif@v3\n        with:\n          sarif_file: ./reports/jscpd-sarif.json\n```\n\nResults appear in the **Security → Code scanning** tab of your repository and as inline annotations on pull request diffs.\n\n## License\n\n[MIT](LICENSE) © Andrey Kucherenko\n","publish_time":1778851971466,"_cnpm_publish_time":1778851971466,"dist-tags":{"latest":"4.2.5"}}