Module Import alias Import alias Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str ImportFrom alias ImportFrom alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias Import alias identifier Assign NameStore Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareEq NameLoad Str body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str Str Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse If BoolOpAnd CompareEq NameLoad Str AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body If AttributeLoad NameLoad attr body AugAssignAdd AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Str decorator_list FunctionDef arguments args NameParam NameParam defaults body If BoolOpAnd CompareEq NameLoad Str AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr BinOpAdd AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index Num Index Str Call AttributeLoad AttributeLoad NameLoad attr attr Str Str orelse If CompareEq NameLoad Str body Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore Call AttributeLoad NameLoad attr Str If CompareIsNot NameLoad NameLoad body If CompareEq NameLoad NameLoad body Print Str Expr Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad For NameStore Call NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Str Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str Str If AttributeLoad NameLoad attr body Print NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad
N/A N/A os N/A sys N/A runPath N/A N/A N/A os path dirname N/A N/A N/A os path realpath __file__ N/A N/A N/A N/A sys path append N/A N/A N/A os path join runPath .. xml.sax make_parser xml.sax.handler ContentHandler N/A argparse N/A zipfile N/A tempfile lib.ProgressBar progressbar lib.Config Configuration N/A lib.DatabaseLayer db N/A argparser N/A N/A argparse ArgumentParser description populate/update NIST CWE Common Weakness Enumeration database N/A N/A N/A argparser add_argument -v action store_true help verbose output N/A args N/A N/A argparser parse_args CWEHandler N/A ContentHandler N/A __init__ N/A N/A self N/A N/A N/A N/A self cwe N/A N/A N/A self description_summary_tag False N/A N/A self weakness_tag False N/A startElement N/A N/A self name attrs N/A N/A N/A N/A name Weakness N/A N/A N/A self weakness_tag True N/A N/A self statement N/A N/A self weaknessabs N/A N/A attrs get Weakness_Abstraction N/A N/A self name N/A N/A attrs get Name N/A N/A self idname N/A N/A attrs get ID N/A N/A self status N/A N/A attrs get Status N/A N/A N/A N/A self cwe append N/A name id status weaknessabs N/A self name N/A self idname N/A self status N/A self weaknessabs N/A N/A N/A N/A name Description_Summary N/A self weakness_tag N/A N/A N/A self description_summary_tag True N/A N/A self description_summary N/A characters N/A N/A self ch N/A N/A N/A N/A self description_summary_tag N/A N/A N/A self description_summary N/A N/A ch replace N/A endElement N/A N/A self name N/A N/A N/A N/A N/A name Description_Summary N/A self weakness_tag N/A N/A N/A self description_summary_tag False N/A N/A self description_summary N/A N/A self description_summary N/A self description_summary N/A N/A N/A N/A self cwe N/A -1 N/A description_summary N/A N/A N/A self description_summary replace N/A N/A N/A name Weakness N/A N/A N/A self weakness_tag False N/A N/A N/A cwedict N/A N/A Configuration getCWEDict N/A parser N/A make_parser N/A ch N/A CWEHandler N/A N/A N/A parser setContentHandler ch N/A N/A N/A f N/A N/A Configuration getFile cwedict N/A N/A N/A N/A N/A N/A sys exit N/A Cannot open url %s. Bad URL or not connected to the internet? cwedict N/A lastmodified N/A N/A f headers N/A last-modified N/A i N/A N/A db getLastModified cwe N/A N/A i None N/A N/A N/A lastmodified i N/A N/A Not modified N/A N/A N/A sys exit 0 N/A tmpdir N/A N/A tempfile gettempdir N/A tmpfile N/A N/A tempfile NamedTemporaryFile N/A cwezip N/A open N/A tmpfile name wb N/A N/A N/A cwezip write N/A N/A f read N/A N/A N/A cwezip close N/A N/A N/A zipfile ZipFile N/A tmpfile name z N/A N/A N/A N/A z extractall tmpdir N/A N/A N/A z close N/A f N/A open N/A N/A N/A os path join tmpdir cwec_v2.8.xml N/A N/A N/A parser parse f N/A cweList N/A N/A cwe N/A progressbar N/A ch cwe N/A N/A N/A cwe N/A description_summary N/A N/A N/A cwe N/A description_summary replace N/A N/A args v N/A N/A cwe N/A N/A N/A cweList append cwe N/A N/A N/A db bulkUpdate cwe cweList N/A N/A N/A db setColUpdate cwe lastmodified