Skip to content

Commit

Permalink
feat: structure for sql table name validation
Browse files Browse the repository at this point in the history
added dictionary to be used for better table name validation. This
will help resolve bandit issues in intel#3965.

Signed-off-by: Meet Soni <[email protected]>
  • Loading branch information
inosmeet committed Apr 10, 2024
1 parent 8a7a66b commit f85cd84
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cve_bin_tool/cvedb.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@ class CVEDB:
""",
}

EMPTY_SELECT_QUERIES = {
"cve_severity": "SELECT * FROM cve_severity WHERE 1=0",
"cve_range": "SELECT * FROM cve_range WHERE 1=0",
"cve_exploited": "SELECT * FROM cve_exploited WHERE 1=0",
"cve_metrics": "SELECT * FROM cve_metrics WHERE 1=0",
"metrics": "SELECT * FROM metrics WHERE 1=0",
}

INSERT_QUERIES = {
"insert_severity": """
INSERT or REPLACE INTO cve_severity(
Expand Down

0 comments on commit f85cd84

Please sign in to comment.