Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The cwe database is incomplete #4

Open
firmianay opened this issue Dec 13, 2022 · 4 comments
Open

The cwe database is incomplete #4

firmianay opened this issue Dec 13, 2022 · 4 comments

Comments

@firmianay
Copy link

https://cwe.mitre.org/data/definitions/399.html

>>> from cwe2.database import Database
>>> db = Database()
>>> db.get(399)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/yangchao/.virtualenvs/cve-env/lib/python3.10/site-packages/cwe2/database.py", line 58, in get
    raise Exception(f"Invalid CWE ID {cwe_id} - {category or ''}")
Exception: Invalid CWE ID 399 - 
@ziadhany
Copy link
Collaborator

@firmianay Good catch , I will fix this problem and I will test it against nvd importer ( vulnerablecode project ) to make sure all cwe-id is working

@ziadhany
Copy link
Collaborator

@firmianay
I couldn't find CWE-399 on https://cwe.mitre.org/data/downloads.html ,
(this CWE ID must not be used to map to real-world vulnerabilities).
https://cwe.mitre.org/data/definitions/399.html

Notes:
Mapping
Use for Mapping: Prohibited (this CWE ID must not be used to map to real-world vulnerabilities).

but it would be great if you have any resources so we can gather that
similar issue :
CWE-264 : Julian-Nash/cwe#3
`

@pombredanne
Copy link
Member

@ziadhany I think you found a solution based on our last community calls, correct?
In the end we will support things that should not be used, because they are still used in the wild?

@ziadhany
Copy link
Collaborator

ziadhany commented Mar 8, 2023

@pombredanne yes now we support all CWE CATEGORY and I am preparing for a release .

>>> db.get(399)
Weakness(cwe_id='399', name='Resource Management Errors', weakness_abstraction=None, status='Draft', description='Weaknesses in this category are related to improper management of system resources.', extended_description=(None,), related_weaknesses=(None,), weakness_ordinalities=(None,), applicable_platforms=None, background_details=None, alternate_terms=None, modes_of_introduction=None, exploitation_factors=None, likelihood_of_exploit=None, common_consequences=None, detection_methods=None, potential_mitigations=None, observed_examples=None, functional_areas=None, affected_resources=None, taxonomy_mappings=None, related_attack_patterns=None, notes=None)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants