Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

axe-sarif-converter

Package Overview
Dependencies
Maintainers
3
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

axe-sarif-converter - npm Package Compare versions

Comparing version 2.8.0 to 2.9.0

6

dist/axe-raw-sarif-converter.js

@@ -56,3 +56,3 @@ "use strict";

taxonomies: [
wcag_taxonomy_provider_1.getWcagTaxonomy(this.wcagLinkDataIndexer.getSortedWcagTags(), this.tagsToWcagLinkData),
(0, wcag_taxonomy_provider_1.getWcagTaxonomy)(this.wcagLinkDataIndexer.getSortedWcagTags(), this.tagsToWcagLinkData),
],

@@ -100,7 +100,7 @@ };

level: this.getResultLevelFromResultKind(kind),
message: sarif_result_message_formatter_1.formatSarifResultMessage(axeRawNodeResult, kind),
message: (0, sarif_result_message_formatter_1.formatSarifResultMessage)(axeRawNodeResult, kind),
locations: [
{
physicalLocation: {
artifactLocation: artifact_property_provider_1.getArtifactLocation(environmentData),
artifactLocation: (0, artifact_property_provider_1.getArtifactLocation)(environmentData),
region: {

@@ -107,0 +107,0 @@ snippet: {

@@ -9,3 +9,3 @@ "use strict";

name: 'axe-core',
fullName: "axe for Web v" + version,
fullName: "axe for Web v".concat(version),
shortDescription: {

@@ -17,9 +17,9 @@ text: 'An open source accessibility rules library for automated testing.',

informationUri: 'https://www.deque.com/axe/axe-for-web/',
downloadUri: "https://www.npmjs.com/package/axe-core/v/" + version,
downloadUri: "https://www.npmjs.com/package/axe-core/v/".concat(version),
properties: {
'microsoft/qualityDomain': 'Accessibility',
},
supportedTaxonomies: [wcag_taxonomy_provider_1.getWcagTaxonomyReference()],
supportedTaxonomies: [(0, wcag_taxonomy_provider_1.getWcagTaxonomyReference)()],
};
}
exports.getAxeToolProperties = getAxeToolProperties;

@@ -55,3 +55,4 @@ #!/usr/bin/env node

type: 'boolean',
}).argv;
})
.parseSync();
var verboseLog = argv.verbose ? console.log : function () { };

@@ -66,3 +67,3 @@ function exitWithErrorMessage(message) {

var sarifLogs = flatten(argv['input-files'].map(function (inputFilePath, index) {
verboseLog("Reading input file " + (index + 1) + "/" + argv['input-files'].length + " " + inputFilePath);
verboseLog("Reading input file ".concat(index + 1, "/").concat(argv['input-files'].length, " ").concat(inputFilePath));
// tslint:disable-next-line: non-literal-fs-path

@@ -78,3 +79,3 @@ var rawInputFileContents = fs.readFileSync(inputFilePath);

// JSON.stringify(await axe.run(...)) would produce
return [_1.convertAxeToSarif(inputFileJson)];
return [(0, _1.convertAxeToSarif)(inputFileJson)];
}

@@ -87,3 +88,3 @@ }));

var outputFileContent = JSON.stringify(combinedLog, null, jsonSpacing);
verboseLog("Writing output file " + argv['output-file']);
verboseLog("Writing output file ".concat(argv['output-file']));
try {

@@ -96,4 +97,4 @@ // tslint:disable-next-line: non-literal-fs-path

catch (e) {
if (e.code == 'EEXIST') {
exitWithErrorMessage("Error: EEXIST: Output file " + argv['output-file'] + " already exists. Did you mean to use --force?");
if (typeof e === 'object' && e != null && e.code === 'EEXIST') {
exitWithErrorMessage("Error: EEXIST: Output file ".concat(argv['output-file'], " already exists. Did you mean to use --force?"));
}

@@ -100,0 +101,0 @@ else {

@@ -8,3 +8,3 @@ "use strict";

function convertAxeToSarif(axeResults) {
var sarifConverter = sarif_converter_1.defaultSarifConverter();
var sarifConverter = (0, sarif_converter_1.defaultSarifConverter)();
return sarifConverter.convert(axeResults, {});

@@ -15,4 +15,4 @@ }

var converterOptions = {};
var environmentData = environment_data_provider_1.getEnvironmentDataFromEnvironment();
var sarifConverter = axe_raw_sarif_converter_1.defaultAxeRawSarifConverter();
var environmentData = (0, environment_data_provider_1.getEnvironmentDataFromEnvironment)();
var sarifConverter = (0, axe_raw_sarif_converter_1.defaultAxeRawSarifConverter)();
var sarifOutput = sarifConverter.convert(rawResults, converterOptions, environmentData);

@@ -19,0 +19,0 @@ callback(sarifOutput);

@@ -73,3 +73,3 @@ "use strict";

index: wcagTagsToTaxaIndices[tag],
toolComponent: wcag_taxonomy_provider_1.getWcagTaxonomyReference(),
toolComponent: (0, wcag_taxonomy_provider_1.getWcagTaxonomyReference)(),
},

@@ -76,0 +76,0 @@ kinds: ['superset'],

@@ -47,3 +47,3 @@ "use strict";

var resultToRuleConverter = result_to_rule_converter_1.ResultToRuleConverter.fromV2Results(results, this.wcagLinkDataIndexer.getSortedWcagTags(), this.wcagLinkDataIndexer.getWcagTagsToTaxaIndices());
var environmentData = environment_data_provider_1.getEnvironmentDataFromResults(results);
var environmentData = (0, environment_data_provider_1.getEnvironmentDataFromResults)(results);
return {

@@ -58,3 +58,3 @@ conversion: this.getConverterToolProperties(),

taxonomies: [
wcag_taxonomy_provider_1.getWcagTaxonomy(this.wcagLinkDataIndexer.getSortedWcagTags(), this.tagsToWcagLinkData),
(0, wcag_taxonomy_provider_1.getWcagTaxonomy)(this.wcagLinkDataIndexer.getSortedWcagTags(), this.tagsToWcagLinkData),
],

@@ -65,3 +65,3 @@ };

var resultArray = [];
var environmentData = environment_data_provider_1.getEnvironmentDataFromResults(results);
var environmentData = (0, environment_data_provider_1.getEnvironmentDataFromResults)(results);
this.convertRuleResults(resultArray, results.violations, ruleIdsToRuleIndices, 'fail', environmentData);

@@ -90,7 +90,7 @@ this.convertRuleResults(resultArray, results.passes, ruleIdsToRuleIndices, 'pass', environmentData);

level: this.getResultLevelFromResultKind(kind),
message: sarif_result_message_formatter_1.formatSarifResultMessage(node, kind),
message: (0, sarif_result_message_formatter_1.formatSarifResultMessage)(node, kind),
locations: [
{
physicalLocation: {
artifactLocation: artifact_property_provider_1.getArtifactLocation(environmentData),
artifactLocation: (0, artifact_property_provider_1.getArtifactLocation)(environmentData),
region: {

@@ -97,0 +97,0 @@ snippet: {

@@ -28,10 +28,10 @@ "use strict";

textLines.push(heading);
markdownLines.push(string_utils_1.escapeForMarkdown(heading));
markdownLines.push((0, string_utils_1.escapeForMarkdown)(heading));
for (var _i = 0, checkResults_1 = checkResults; _i < checkResults_1.length; _i++) {
var checkResult = checkResults_1[_i];
var message = string_utils_1.isNotEmpty(checkResult.message)
var message = (0, string_utils_1.isNotEmpty)(checkResult.message)
? checkResult.message
: checkResult.id;
textLines.push(message + '.');
markdownLines.push('- ' + string_utils_1.escapeForMarkdown(message) + '.');
markdownLines.push('- ' + (0, string_utils_1.escapeForMarkdown)(message) + '.');
}

@@ -38,0 +38,0 @@ textArray.push(textLines.join(' '));

@@ -6,5 +6,5 @@ "use strict";

return {
text: "WCAG " + sectionNumber,
text: "WCAG ".concat(sectionNumber),
title: title,
url: "https://www.w3.org/WAI/WCAG21/Understanding/" + urlFormattedTitle,
url: "https://www.w3.org/WAI/WCAG21/Understanding/".concat(urlFormattedTitle),
};

@@ -11,0 +11,0 @@ }

{
"name": "axe-sarif-converter",
"version": "2.8.0",
"version": "2.9.0",
"description": "Convert axe-core accessibility scan results to the SARIF format",

@@ -22,6 +22,6 @@ "main": "dist/index.js",

"devDependencies": {
"@types/jest": "^26.0.0",
"@types/jest": "^27.4.0",
"@types/lodash": "^4.14.136",
"@types/node": "^14.0.1",
"@types/yargs": "^16.0.0",
"@types/yargs": "^17.0.8",
"@typescript-eslint/eslint-plugin": "^4.0.1",

@@ -32,3 +32,3 @@ "@typescript-eslint/parser": "^4.0.1",

"jest": "^27.0.3",
"jest-junit": "^12.1.0",
"jest-junit": "^13.0.0",
"license-check-and-add": "^4.0.1",

@@ -38,3 +38,3 @@ "lodash": "^4.17.15",

"rimraf": "^3.0.0",
"semantic-release": "^17.1.1",
"semantic-release": "^19.0.2",
"ts-jest": "^27.0.2",

@@ -48,3 +48,4 @@ "typemoq": "^2.1.0",

"kind-of": "^6.0.3",
"semantic-release/**/lock-verify/**/yargs": "^15.4.1"
"ansi-regex": "^5.0.1",
"@npmcli/arborist": ">=2.8.2"
},

@@ -51,0 +52,0 @@ "scripts": {

@@ -69,3 +69,3 @@ <!--

- axe-sarif-converter version 2.x supports input from version ^3.2.0 || ^4.0.0 of axe-core (tested with 3.2.2, 3.3.2, 3.4.1, 3.4.2, 3.5.1, 3.5.2, 3.5.3, 3.5.4, 3.5.5, 4.0.1, 4.0.2, 4.1.1, 4.2.0, and 4.3.2) and outputs SARIF v2.1
- axe-sarif-converter version 2.x supports input from version ^3.2.0 || ^4.0.0 of axe-core (tested with 3.2.2, 3.3.2, 3.4.1, 3.4.2, 3.5.1, 3.5.2, 3.5.3, 3.5.4, 3.5.5, 4.0.1, 4.0.2, 4.1.1, 4.2.0, 4.3.2, and 4.4.1) and outputs SARIF v2.1
- axe-sarif-converter version 1.x supports input from version >= 3.2.0 < 3.3.0 of axe-core (tested with 3.2.2) and outputs SARIF v2.0

@@ -72,0 +72,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc