diff options
author | Florian Weimer <fw@deneb.enyo.de> | 2005-12-17 11:17:21 +0000 |
---|---|---|
committer | Florian Weimer <fw@deneb.enyo.de> | 2005-12-17 11:17:21 +0000 |
commit | abfae9f8e7ecb251b674493e4f6b5d0345562a42 (patch) | |
tree | 763e306acd84d8dec722180eafe9fb99d853bfe6 /bin/update-nvd | |
parent | c6547942b6341017b650ab18e36e297d53947670 (diff) |
Store CVE descriptions in the nvd_data table. Enable incremental
NVD updates.
lib/python/security_db.py (DB):
Bump schema version. Add cve_desc column to the nvd_data table.
(DB.updateNVD):
New method.
bin/update-nvd:
If the -i option is specified, use updateNVD instead of replaceNVD.
lib/python/nvd.py (_Parser):
Add new member variable path.
(_Parser.characters):
New method.
(_Parser.endElement):
Store cve_desc variable.
bin/tracker_service.py (TrackerService.page_bug):
Use NVD description if available.
git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@3078 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'bin/update-nvd')
-rw-r--r-- | bin/update-nvd | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/update-nvd b/bin/update-nvd index 4910845ef9..88fe39450b 100644 --- a/bin/update-nvd +++ b/bin/update-nvd @@ -24,12 +24,19 @@ import security_db db_file = 'data/security.db' db = security_db.DB(db_file) +incremental = False data = [] for name in sys.argv[1:]: + if name == '-i': + incremental = True + continue f = file(name) data += nvd.parse(f) f.close() cursor = db.writeTxn() -db.replaceNVD(cursor, data) +if incremental: + db.updateNVD(cursor, data) +else: + db.replaceNVD(cursor, data) db.commit(cursor) |