Skip to content

Commit

Permalink
fix: improve schema validation for bandit
Browse files Browse the repository at this point in the history
In the course of some other refactoring in cvedb.py, we've got another
way to handle schema valiation such that bandit won't complain.

* fixes intel#3933
* closes intel#3965

Signed-off-by: Terri Oda <terri.oda@intel.com>
  • Loading branch information
terriko committed Aug 8, 2024
1 parent 7abee04 commit 0961041
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cve_bin_tool/cvedb.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ def latest_schema(

self.LOGGER.debug("Check database is using latest schema")
cursor = self.db_open_and_get_cursor()
schema_check = f"SELECT * FROM {table_name} WHERE 1=0" # nosec
schema_check = self.EMPTY_SELECT_QUERIES[table_name]
result = cursor.execute(schema_check)
schema_latest = False

Expand Down

0 comments on commit 0961041

Please sign in to comment.