-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #416 from davelosert/adjust_summary_format
Adjust summary format
- Loading branch information
Showing
17 changed files
with
734 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,3 +100,5 @@ Thumbs.db | |
# Ignore built ts files | ||
__tests__/runner/* | ||
lib/**/* | ||
|
||
tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import {Change} from '../../src/schemas' | ||
import {createTestVulnerability} from './create-test-vulnerability' | ||
|
||
const defaultChange: Change = { | ||
change_type: 'added', | ||
manifest: 'package.json', | ||
ecosystem: 'npm', | ||
name: 'lodash', | ||
version: '4.17.20', | ||
package_url: 'pkg:npm/[email protected]', | ||
license: 'MIT', | ||
source_repository_url: 'https://github.com/lodash/lodash', | ||
scope: 'runtime', | ||
vulnerabilities: [ | ||
createTestVulnerability({ | ||
severity: 'high', | ||
advisory_ghsa_id: 'GHSA-35jh-r3h4-6jhm', | ||
advisory_summary: 'Command Injection in lodash', | ||
advisory_url: 'https://github.com/advisories/GHSA-35jh-r3h4-6jhm' | ||
}), | ||
createTestVulnerability({ | ||
severity: 'moderate', | ||
advisory_ghsa_id: 'GHSA-29mw-wpgm-hmr9', | ||
advisory_summary: | ||
'Regular Expression Denial of Service (ReDoS) in lodash', | ||
advisory_url: 'https://github.com/advisories/GHSA-29mw-wpgm-hmr9' | ||
}) | ||
] | ||
} | ||
|
||
const createTestChange = (overwrites: Partial<Change> = {}): Change => ({ | ||
...defaultChange, | ||
...overwrites | ||
}) | ||
|
||
export {createTestChange} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import {Change} from '../../src/schemas' | ||
|
||
type Vulnerability = Change['vulnerabilities'][0] | ||
|
||
const defaultTestVulnerability: Vulnerability = { | ||
severity: 'high', | ||
advisory_ghsa_id: 'GHSA-35jh-r3h4-6jhm', | ||
advisory_summary: 'Command Injection in lodash', | ||
advisory_url: 'https://github.com/advisories/GHSA-35jh-r3h4-6jhm' | ||
} | ||
|
||
const createTestVulnerability = ( | ||
overwrites: Partial<Vulnerability> = {} | ||
): Vulnerability => ({ | ||
...defaultTestVulnerability, | ||
...overwrites | ||
}) | ||
|
||
export {createTestVulnerability} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.