-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move to requirements.txt; update dependencies; partial update for NIS…
…T NVD CPE API (2.0)
- Loading branch information
1 parent
7ab023d
commit aa96aa3
Showing
38 changed files
with
241 additions
and
1,568 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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
[run] | ||
omit = | ||
*tests* | ||
source = ddssa | ||
omit = ddssa/tests | ||
|
||
[report] | ||
fail_under = 36 |
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,25 @@ | ||
name: Build and verify | ||
|
||
on: push | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.12 | ||
cache: pip | ||
- run: pip install -r requirements.txt -r requirements-dev.txt | ||
|
||
- name: Formatting check [black] | ||
run: black --check . | ||
|
||
- name: Linting check [pylint] | ||
run: pylint ddssa | ||
|
||
- name: Run tests | ||
run: pytest |
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
"""This module contains the CSTSupplier class""" | ||
|
||
|
||
import ast | ||
import libcst | ||
import os | ||
|
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
"""This module contains the StallVisitor class""" | ||
|
||
|
||
import libcst | ||
|
||
|
||
|
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
"""This module contains the PackageIds enum class""" | ||
|
||
|
||
from enum import Enum | ||
|
||
|
||
|
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
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
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
"""This module contains the SetupParser class""" | ||
|
||
|
||
import configparser | ||
import os | ||
import sys | ||
|
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
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,113 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "JSON Schema for NVD Common Product Enumeration (CPE) API version 2.0", | ||
"$id": "https://csrc.nist.gov/schema/nvd/api/2.0/cpe_api_json_2.0.schema", | ||
"definitions": { | ||
"defTitle": { | ||
"description": "Human readable title for CPE", | ||
"type": "object", | ||
"properties": { | ||
"title": {"type": "string"}, | ||
"lang": {"type": "string"} | ||
}, | ||
"required": ["title", "lang"], | ||
"additionalProperties": false | ||
}, | ||
"defReference": { | ||
"description": "Internet resource for CPE", | ||
"type": "object", | ||
"properties": { | ||
"ref": { | ||
"type": "string", | ||
"pattern": "^([A-Za-z][A-Za-z0-9+.-]+):(\\/\\/([^@]+@)?([A-Za-z0-9.\\-_~]+)(:\\d+)?)?((?:[A-Za-z0-9-._~]|%[A-Fa-f0-9]|[!$&'\\[\\]()*+,;=:@])+(?:\\/(?:[A-Za-z0-9-._~]|%[A-Fa-f0-9]|[!$&'\\[\\]()*+,;=:@])*)*|(?:\\/(?:[A-Za-z0-9-._~]|%[A-Fa-f0-9]|[!$&'()*+,;=:@])+)*)?(\\?(?:[A-Za-z0-9-._~]|%[A-Fa-f0-9]|[!$&'\\[\\]()*+,;=:@]|[/?])*)?(\\#(?:[A-Za-z0-9-._~]|%[A-Fa-f0-9]|[!$&'\\[\\]()*+,;=:@]|[/?])*)?$" | ||
}, | ||
"type": { | ||
"type": "string", | ||
"enum": [ | ||
"Advisory", | ||
"Change Log", | ||
"Product", | ||
"Project", | ||
"Vendor", | ||
"Version" | ||
] | ||
} | ||
}, | ||
"required": ["ref"], | ||
"additionalProperties": false | ||
}, | ||
|
||
"defCpe": { | ||
"type": "object", | ||
"properties": { | ||
"cpe": { | ||
"type": "object", | ||
"properties": { | ||
"deprecated" : {"type" : "boolean"}, | ||
"cpeName": {"type": "string"}, | ||
"cpeNameId": {"type": "string", "format": "uuid"}, | ||
"created": {"type": "string", "format": "date-time"}, | ||
"lastModified": {"type": "string", "format": "date-time"}, | ||
"titles": { | ||
"type": "array", | ||
"items": {"$ref": "#/definitions/defTitle"} | ||
}, | ||
"refs": { | ||
"type": "array", | ||
"items": {"$ref": "#/definitions/defReference"} | ||
}, | ||
"deprecatedBy": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"cpeName": {"type": "string"}, | ||
"cpeNameId": {"type": "string", "format": "uuid"} | ||
} | ||
} | ||
}, | ||
"deprecates": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"cpeName": {"type": "string"}, | ||
"cpeNameId": {"type": "string", "format": "uuid"} | ||
} | ||
} | ||
} | ||
}, | ||
"required": ["cpeName", "cpeNameId", "deprecated", "lastModified", "created"], | ||
"additionalProperties": false | ||
} | ||
}, | ||
"required": ["cpe"], | ||
"additionalProperties": false | ||
} | ||
|
||
}, | ||
"type": "object", | ||
"properties": { | ||
"resultsPerPage": {"type": "integer"}, | ||
"startIndex": {"type": "integer"}, | ||
"totalResults": {"type": "integer"}, | ||
"format": {"type": "string"}, | ||
"version": {"type": "string"}, | ||
"timestamp": {"type": "string", "format": "date-time"}, | ||
"products": { | ||
"description": "NVD feed array of CPE", | ||
"type": "array", | ||
"items": {"$ref": "#/definitions/defCpe"} | ||
} | ||
}, | ||
"required": [ | ||
"resultsPerPage", | ||
"startIndex", | ||
"totalResults", | ||
"format", | ||
"version", | ||
"timestamp", | ||
"products" | ||
], | ||
"additionalProperties": false | ||
} |
Oops, something went wrong.