Gathering detailed insights and metrics for axe-sarif-converter
Gathering detailed insights and metrics for axe-sarif-converter
Gathering detailed insights and metrics for axe-sarif-converter
Gathering detailed insights and metrics for axe-sarif-converter
An axe-core reporter that outputs axe scan results in SARIF format (http://sarifweb.azurewebsites.net/)
npm install axe-sarif-converter
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (94.06%)
JavaScript (5.83%)
HTML (0.11%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
32 Stars
1,040 Commits
29 Forks
14 Watchers
20 Branches
10,000 Contributors
Updated on Jul 03, 2025
Latest Version
3.0.0
Package Id
axe-sarif-converter@3.0.0
Unpacked Size
58.32 kB
Size
14.46 kB
File Count
45
NPM Version
10.1.0
Node Version
20.17.0
Published on
Jan 06, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
4
22
Convert axe-core accessibility scan results to the SARIF format. Provides both a TypeScript API and a CLI tool.
Use this with the Sarif Viewer Build Tab Azure DevOps Extension to visualize accessibility scan results in the build results of an Azure Pipelines build.
Before using axe-sarif-converter, you will need to run an axe accessibility scan to produce some axe results to convert. Typically, you would do this by using an axe integration library for your favorite browser automation tool (@axe-core/puppeteer, @axe-core/webdriverjs, cypress-axe).
axe-sarif-converter exports a single function, named convertAxeToSarif
. Use it like this:
1import * as Axe from 'axe-core'; 2import * as AxePuppeteer from '@axe-core/puppeteer'; 3import * as fs from 'fs'; 4import * as Puppeteer from 'puppeteer'; 5import * as util from 'util'; 6 7import { convertAxeToSarif, SarifLog } from 'axe-sarif-converter'; 8 9test('my accessibility test', async () => { 10 // This example uses @axe-core/puppeteer, but you can use any axe-based 11 // library that outputs axe scan results in the default axe output format 12 const testPage: Puppeteer.Page = /* ... set up your test page ... */; 13 const axeResults: Axe.AxeResults = await new AxePuppeteer(testPage).analyze(); 14 15 // Perform the conversion 16 const sarifResults: SarifLog = convertAxeToSarif(axeResults); 17 18 // Output a SARIF file, perhaps for use with a Sarif Viewer tool 19 await util.promisify(fs.writeFile)( 20 './test-results/my-accessibility-test.sarif', 21 JSON.stringify(sarifResults), 22 { encoding: 'utf8' }); 23}
You can also use axe-sarif-converter as a command line tool:
1# @axe-core/cli is used here for example purposes only; you could also run axe-core 2# using your library of choice and JSON.stringify the results. 3npx @axe-core/cli https://accessibilityinsights.io --save ./sample-axe-results.json 4 5npx axe-sarif-converter --input-files ./sample-axe-results.json --output-file ./sample-axe-results.sarif
See npx axe-sarif-converter --help
for full command line option details.
The microsoft/axe-pipelines-samples project contains full sample code that walks you through integrating this library into your project, from writing a test to seeing results in Azure Pipelines.
The version number of this library is independent from the version numbers of the axe-core inputs and SARIF outputs it supports.
Note that the SARIF format does not use semantic versioning, and there are breaking changes between the v2.0 and v2.1 SARIF formats. If you need compatibility with a SARIF viewer that only supports v2.0, you should use version 1.x of this library.
All contributions are welcome! To get started, please read through our CONTRIBUTING guidelines for this project.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For more details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
No vulnerabilities found.
Reason
security policy file detected
Details
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
branch protection is not maximal on development and all release branches
Details
Reason
5 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 4
Reason
Found 1/5 approved changesets -- score normalized to 2
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
10 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-14
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