code stringlengths 14 2.05k | label int64 0 1 | programming_language stringclasses 7
values | cwe_id stringlengths 6 14 | cwe_name stringlengths 5 98 ⌀ | description stringlengths 36 379 ⌀ | url stringlengths 36 48 ⌀ | label_name stringclasses 2
values |
|---|---|---|---|---|---|---|---|
def handle_protectederror(obj_list, request, e):
"""
Generate a user-friendly error message in response to a ProtectedError exception.
"""
protected_objects = list(e.protected_objects)
protected_count = len(protected_objects) if len(protected_objects) <= 50 else "More than 50"
err_message = (
... | 0 | Python | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
def post(self, request, pk):
virtual_chassis = get_object_or_404(self.queryset, pk=pk)
member_select_form = forms.VCMemberSelectForm(request.POST)
if member_select_form.is_valid():
device = member_select_form.cleaned_data["device"]
device.virtual_chassis = virtual_c... | 0 | Python | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
def render_description(self, record):
if record.description:
return mark_safe(render_markdown(record.description))
return self.default | 0 | Python | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
def computed_fields(context, obj, advanced_ui=None):
"""
Render all applicable links for the given object.
This can also check whether the advanced_ui attribute is True or False for UI display purposes.
"""
fields = obj.get_computed_fields(label_as_key=True, advanced_ui=advanced_ui)
if not compu... | 0 | Python | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
def _get_registered_content(obj, method, template_context, return_html=True):
"""
Given an object and a TemplateExtension method name and the template context, return all the
registered content for the object's model.
"""
context = {
"object": obj,
"request": template_context["reques... | 0 | Python | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
def test_custom_field_table_render(self):
queryset = Location.objects.filter(name=self.location.name)
location_table = LocationTable(queryset)
custom_column_expected = {
"text_field": "bar",
"number_field": "456",
"boolean_field": '<span class="text-succe... | 0 | Python | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
def post(self, request, pk):
post_data = request.POST
job_button = JobButton.objects.get(pk=pk)
job_model = job_button.job
result = JobResult.enqueue_job(
job_model=job_model,
user=request.user,
object_pk=post_data["object_pk"],
object_... | 0 | Python | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
def render_markdown(value):
"""
Render text as Markdown
Example:
{{ text | render_markdown }}
"""
# Strip HTML tags
value = strip_tags(value)
# Sanitize Markdown links
schemes = "|".join(settings.ALLOWED_URL_SCHEMES)
pattern = rf"\[(.+)\]\((?!({schemes})).*:(.+)\)"
valu... | 0 | Python | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
def test_support_message(self):
"""Test the `support_message` tag with config and settings."""
with override_settings():
del settings.SUPPORT_MESSAGE
with override_config():
self.assertHTMLEqual(
helpers.support_message(),
... | 0 | Python | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
def test_render_markdown(self):
self.assertTrue(callable(helpers.render_markdown))
# Test common markdown formatting.
self.assertEqual(helpers.render_markdown("**bold**"), "<p><strong>bold</strong></p>")
self.assertEqual(helpers.render_markdown("__bold__"), "<p><strong>bold</strong><... | 0 | Python | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
def test_500_custom_support_message(self, mock_get):
"""Nautobot's custom 500 page should be used and should include a default support message."""
url = reverse("home")
with self.assertTemplateUsed("500.html"):
self.client.raise_request_exception = False
response = se... | 0 | Python | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
def test_404_default_support_message(self):
"""Nautobot's custom 404 page should be used and should include a default support message."""
with self.assertTemplateUsed("404.html"):
response = self.client.get("/foo/bar")
self.assertContains(response, "Network to Code", status_code=... | 0 | Python | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
def test_500_default_support_message(self, mock_get):
"""Nautobot's custom 500 page should be used and should include a default support message."""
url = reverse("home")
with self.assertTemplateUsed("500.html"):
self.client.raise_request_exception = False
response = s... | 0 | Python | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
def testConv3DTransposeShapeMismatch(self):
# Test case for GitHub issue 18460
x_shape = [2, 2, 3, 4, 3]
f_shape = [3, 3, 3, 2, 2]
y_shape = [2, 2, 6, 8, 6]
strides = [1, 1, 2, 2, 2]
np.random.seed(1)
x_value = np.random.random_sample(x_shape).astype(np.float64)
f_value = np.random.ran... | 0 | Python | NVD-CWE-noinfo | null | null | null | vulnerable |
def testPoolingRatioValueOutOfRange(self):
with self.cached_session() as _:
# Whether turn on `TF2_BEHAVIOR` generates different error messages
with self.assertRaisesRegex(
(errors.InvalidArgumentError, ValueError),
r"(pooling_ratio cannot be smaller than 1, got: .*)|(is negative)"... | 0 | Python | CWE-415 | Double Free | The product calls free() twice on the same memory address, potentially leading to modification of unexpected memory locations. | https://cwe.mitre.org/data/definitions/415.html | vulnerable |
def testPoolingRatioValueOutOfRange(self):
with self.cached_session() as _:
# Whether turn on `TF2_BEHAVIOR` generates different error messages
with self.assertRaisesRegex(
(errors.InvalidArgumentError, ValueError),
r"(pooling_ratio cannot be smaller than 1, got: .*)|(is negative)"... | 0 | Python | CWE-415 | Double Free | The product calls free() twice on the same memory address, potentially leading to modification of unexpected memory locations. | https://cwe.mitre.org/data/definitions/415.html | vulnerable |
def testSnapshotRecoveryFailsWithBadSplitNames(self, bad_split_filename):
cluster, _ = self.setup()
write_file(os.path.join(self.source_dir(), bad_split_filename))
with self.assertRaisesRegex(ValueError, "can't parse"):
cluster.restart_dispatcher() | 0 | Python | CWE-125 | Out-of-bounds Read | The product reads data past the end, or before the beginning, of the intended buffer. | https://cwe.mitre.org/data/definitions/125.html | vulnerable |
def testSnapshotRecoveryFailsWithOutOfOrderSplitName(self):
cluster, _ = self.setup()
write_file(os.path.join(self.source_dir(), "split_1_0"))
with self.assertRaisesRegex(ValueError, "found conflict"):
cluster.restart_dispatcher() | 0 | Python | CWE-125 | Out-of-bounds Read | The product reads data past the end, or before the beginning, of the intended buffer. | https://cwe.mitre.org/data/definitions/125.html | vulnerable |
def testParallelConcatShapeZero(self):
if not tf2.enabled():
self.skipTest("only fails in TF2")
@def_function.function
def f():
y = gen_array_ops.parallel_concat(values=[["tf"]], shape=0)
return y
with self.assertRaisesRegex(errors.InvalidArgumentError,
... | 0 | Python | CWE-476 | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | https://cwe.mitre.org/data/definitions/476.html | vulnerable |
def create_ssh_cred() -> None:
from jinja2 import Environment, FileSystemLoader
user_group = roxywi_common.get_user_group()
name = common.checkAjaxInput(form.getvalue('new_ssh'))
name = f'{name}_{user_group}'
enable = common.checkAjaxInput(form.getvalue('ssh_enable'))
group = common.checkAjaxInput(form.getvalue(... | 0 | Python | CWE-668 | Exposure of Resource to Wrong Sphere | The product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource. | https://cwe.mitre.org/data/definitions/668.html | vulnerable |
def extract_ip_or_domain(url):
ip_regex = re.compile("^(?:http://|https://)(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})")
domain_regex = re.compile("^(?:http://|https://)([a-zA-Z0-9.-]+)")
match = ip_regex.findall(url)
if len(match):
ip_address = match[0]
try:
ipaddress.ip_ad... | 0 | Python | CWE-918 | Server-Side Request Forgery (SSRF) | The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination. | https://cwe.mitre.org/data/definitions/918.html | vulnerable |
def webhook(self, request: WSGIRequest, path: str, previous_value) -> HttpResponse:
print(request.body)
return HttpResponse("[accepted]") | 0 | Python | CWE-203 | Observable Discrepancy | The product behaves differently or sends different responses under different circumstances in a way that is observable to an unauthorized actor, which exposes security-relevant information about the state of the product, such as whether a particular operation was successful or not. | https://cwe.mitre.org/data/definitions/203.html | vulnerable |
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
configuration = {item["name"]: item["value"] for item in self.configuration}
self.config = GatewayConfig(
gateway_name=GATEWAY_NAME,
auto_capture=True, # FIXME check this
supported_cur... | 0 | Python | CWE-203 | Observable Discrepancy | The product behaves differently or sends different responses under different circumstances in a way that is observable to an unauthorized actor, which exposes security-relevant information about the state of the product, such as whether a particular operation was successful or not. | https://cwe.mitre.org/data/definitions/203.html | vulnerable |
def create_transaction(
payment: Payment,
kind: str,
payment_information: PaymentData,
action_required: bool = False,
gateway_response: GatewayResponse = None,
error_msg=None,
) -> Transaction:
"""Create a transaction based on transaction kind and gateway response."""
# Default values fo... | 0 | Python | CWE-203 | Observable Discrepancy | The product behaves differently or sends different responses under different circumstances in a way that is observable to an unauthorized actor, which exposes security-relevant information about the state of the product, such as whether a particular operation was successful or not. | https://cwe.mitre.org/data/definitions/203.html | vulnerable |
def gateway_postprocess(transaction, payment):
if not transaction.is_success:
return
if transaction.action_required:
payment.to_confirm = True
payment.save(update_fields=["to_confirm"])
return
transaction_kind = transaction.kind
# if transaction.action_required:
# ... | 0 | Python | CWE-203 | Observable Discrepancy | The product behaves differently or sends different responses under different circumstances in a way that is observable to an unauthorized actor, which exposes security-relevant information about the state of the product, such as whether a particular operation was successful or not. | https://cwe.mitre.org/data/definitions/203.html | vulnerable |
def test_account_reset_password_user_is_inactive(
mocked_notify, user_api_client, customer_user, channel_USD
):
user = customer_user
user.is_active = False
user.save()
variables = {
"email": customer_user.email,
"redirectUrl": "https://www.example.com",
"channel": channel_US... | 0 | Python | CWE-209 | Generation of Error Message Containing Sensitive Information | The product generates an error message that includes sensitive information about its environment, users, or associated data. | https://cwe.mitre.org/data/definitions/209.html | vulnerable |
def mutate(cls, root, info: ResolveInfo, **data):
disallow_replica_in_context(info.context)
setup_context_user(info.context)
if not cls.check_permissions(info.context, data=data):
raise PermissionDenied(permissions=cls._meta.permissions)
manager = get_plugin_manager_prom... | 0 | Python | CWE-209 | Generation of Error Message Containing Sensitive Information | The product generates an error message that includes sensitive information about its environment, users, or associated data. | https://cwe.mitre.org/data/definitions/209.html | vulnerable |
def test_graphql_execution_exception(monkeypatch, api_client):
def mocked_execute(*args, **kwargs):
raise IOError("Spanish inquisition")
monkeypatch.setattr("graphql.backend.core.execute_and_validate", mocked_execute)
response = api_client.post_graphql("{ shop { name }}")
assert response.status... | 0 | Python | CWE-209 | Generation of Error Message Containing Sensitive Information | The product generates an error message that includes sensitive information about its environment, users, or associated data. | https://cwe.mitre.org/data/definitions/209.html | vulnerable |
async def test_secure_channel_key_expiration(srv_crypto_one_cert, mocker):
timeout = 1
_, cert = srv_crypto_one_cert
clt = Client(uri_crypto_cert)
clt.secure_channel_timeout = timeout * 1000
user_cert = uacrypto.CertProperties(peer_creds['certificate'], "DER")
user_key = uacrypto.CertProperties(... | 0 | Python | CWE-287 | Improper Authentication | When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. | https://cwe.mitre.org/data/definitions/287.html | vulnerable |
def data_received(self, data):
self._buffer += data
# try to parse the incoming data
while self._buffer:
try:
buf = Buffer(self._buffer)
try:
header = header_from_binary(buf)
except NotEnoughData:
... | 0 | Python | CWE-835 | Loop with Unreachable Exit Condition ('Infinite Loop') | The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop. | https://cwe.mitre.org/data/definitions/835.html | vulnerable |
def render(
self, tokens: Sequence[Token], options: OptionsDict, env: MutableMapping
) -> str:
"""Takes token stream and generates HTML.
:param tokens: list on block tokens to render
:param options: params of parser instance
:param env: additional data from parsed input
... | 0 | Python | NVD-CWE-Other | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | https://nvd.nist.gov/vuln/categories | vulnerable |
def renderInlineAsText(
self,
tokens: Sequence[Token] | None,
options: OptionsDict,
env: MutableMapping,
) -> str:
"""Special kludge for image `alt` attributes to conform CommonMark spec.
Don't try to use it! Spec requires to show `alt` content with stripped mark... | 0 | Python | NVD-CWE-Other | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | https://nvd.nist.gov/vuln/categories | vulnerable |
def image(
self,
tokens: Sequence[Token],
idx: int,
options: OptionsDict,
env: MutableMapping,
) -> str:
token = tokens[idx]
# "alt" attr MUST be set, even if empty. Because it's mandatory and
# should be placed on proper position for tests.
... | 0 | Python | NVD-CWE-Other | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | https://nvd.nist.gov/vuln/categories | vulnerable |
def replace(state: StateCore) -> None:
if not state.md.options.typographer:
return
for token in state.tokens:
if token.type != "inline":
continue
assert token.children is not None
if SCOPED_ABBR_RE.search(token.content):
replace_scoped(token.children)
... | 0 | Python | NVD-CWE-Other | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | https://nvd.nist.gov/vuln/categories | vulnerable |
def smartquotes(state: StateCore) -> None:
if not state.md.options.typographer:
return
for token in state.tokens:
if token.type != "inline" or not QUOTE_RE.search(token.content):
continue
assert token.children is not None
process_inlines(token.children, state) | 0 | Python | NVD-CWE-Other | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | https://nvd.nist.gov/vuln/categories | vulnerable |
def convert_file(filename: str) -> None:
"""
Parse a Markdown file and dump the output to stdout.
"""
try:
with open(filename, "r") as fin:
rendered = MarkdownIt().render(fin.read())
print(rendered, end="")
except OSError:
sys.stderr.write(f'Cannot open file "... | 0 | Python | NVD-CWE-Other | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | https://nvd.nist.gov/vuln/categories | vulnerable |
def get(self, path: str) -> None:
parts = path.split("/")
component_name = parts[0]
component_root = self._registry.get_component_path(component_name)
if component_root is None:
self.write(f"{path} not found")
self.set_status(404)
return
f... | 0 | Python | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
def validate_absolute_path(self, root, absolute_path):
try:
media_file_manager.get(absolute_path)
except KeyError:
LOGGER.error("MediaFileManager: Missing file %s" % absolute_path)
raise tornado.web.HTTPError(404, "%s not found", absolute_path)
return abs... | 0 | Python | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
def test_invalid_content_request(self):
"""Test request failure when invalid content (file) is provided."""
with mock.patch("streamlit.components.v1.components.os.path.isdir"):
declare_component("test", path=PATH)
with mock.patch("streamlit.components.v1.components.open") as m:... | 0 | Python | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
def test_invalid_component_request(self):
"""Test request failure when invalid component name is provided."""
response = self._request_component("invalid_component")
self.assertEqual(404, response.code)
self.assertEqual(b"invalid_component not found", response.body) | 0 | Python | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
def test_invalid_encoding_request(self):
"""Test request failure when invalid encoded file is provided."""
with mock.patch("streamlit.components.v1.components.os.path.isdir"):
declare_component("test", path=PATH)
with mock.patch("streamlit.components.v1.components.open") as m:
... | 0 | Python | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
def convert(cls, bytestring=None, *, file_obj=None, url=None, dpi=96,
parent_width=None, parent_height=None, scale=1, unsafe=False,
background_color=None, negate_colors=False,
invert_images=False, write_to=None, output_width=None,
output_height=None, *... | 0 | Python | CWE-918 | Server-Side Request Forgery (SSRF) | The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination. | https://cwe.mitre.org/data/definitions/918.html | vulnerable |
def download_url(url, proxies=None):
"""
Downloads a given url in a temporary file. This function is not safe to use in multiple processes. Its only use is
for deprecated behavior allowing to download config/models with a single url instead of using the Hub.
Args:
url (`str`): The url of the fi... | 0 | Python | CWE-377 | Insecure Temporary File | Creating and using insecure temporary files can leave application and system data vulnerable to attack. | https://cwe.mitre.org/data/definitions/377.html | vulnerable |
def test_legacy_index_retriever_retrieve(self):
n_docs = 1
retriever = self.get_dummy_legacy_index_retriever()
hidden_states = np.array(
[np.ones(self.retrieval_vector_size), -np.ones(self.retrieval_vector_size)], dtype=np.float32
)
retrieved_doc_embeds, doc_ids, ... | 0 | Python | CWE-502 | Deserialization of Untrusted Data | The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid. | https://cwe.mitre.org/data/definitions/502.html | vulnerable |
def test_legacy_index_retriever_retrieve(self):
n_docs = 1
retriever = self.get_dummy_legacy_index_retriever()
hidden_states = np.array(
[np.ones(self.retrieval_vector_size), -np.ones(self.retrieval_vector_size)], dtype=np.float32
)
retrieved_doc_embeds, doc_ids, ... | 0 | Python | CWE-502 | Deserialization of Untrusted Data | The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid. | https://cwe.mitre.org/data/definitions/502.html | vulnerable |
def get_dummy_legacy_index_retriever(self):
dataset = Dataset.from_dict(
{
"id": ["0", "1"],
"text": ["foo", "bar"],
"title": ["Foo", "Bar"],
"embeddings": [np.ones(self.retrieval_vector_size + 1), 2 * np.ones(self.retrieval_vector_... | 0 | Python | CWE-502 | Deserialization of Untrusted Data | The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid. | https://cwe.mitre.org/data/definitions/502.html | vulnerable |
def get_dummy_legacy_index_retriever(self):
dataset = Dataset.from_dict(
{
"id": ["0", "1"],
"text": ["foo", "bar"],
"title": ["Foo", "Bar"],
"embeddings": [np.ones(self.retrieval_vector_size + 1), 2 * np.ones(self.retrieval_vector_... | 0 | Python | CWE-502 | Deserialization of Untrusted Data | The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid. | https://cwe.mitre.org/data/definitions/502.html | vulnerable |
def test_legacy_hf_index_retriever_save_and_from_pretrained(self):
retriever = self.get_dummy_legacy_index_retriever()
with tempfile.TemporaryDirectory() as tmp_dirname:
retriever.save_pretrained(tmp_dirname)
retriever = RagRetriever.from_pretrained(tmp_dirname)
s... | 0 | Python | CWE-502 | Deserialization of Untrusted Data | The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid. | https://cwe.mitre.org/data/definitions/502.html | vulnerable |
def test_legacy_hf_index_retriever_save_and_from_pretrained(self):
retriever = self.get_dummy_legacy_index_retriever()
with tempfile.TemporaryDirectory() as tmp_dirname:
retriever.save_pretrained(tmp_dirname)
retriever = RagRetriever.from_pretrained(tmp_dirname)
s... | 0 | Python | CWE-502 | Deserialization of Untrusted Data | The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid. | https://cwe.mitre.org/data/definitions/502.html | vulnerable |
def dump_content(destination, path, getter):
logging.debug(path)
content = getter(path)
if path.endswith("/"):
path = path + "index.html"
path = Path(destination) / path.lstrip("/")
path.parent.mkdir(parents=True, exist_ok=True)
with open(path, "wb") as f:
f.write(content)
... | 0 | Python | CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the... | https://cwe.mitre.org/data/definitions/22.html | vulnerable |
def dump_content(destination, path, getter):
logging.debug(path)
content = getter(path)
if path.endswith("/"):
path = path + "index.html"
path = Path(destination) / path.lstrip("/")
path.parent.mkdir(parents=True, exist_ok=True)
with open(path, "wb") as f:
f.write(content)
... | 0 | Python | CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the... | https://cwe.mitre.org/data/definitions/22.html | vulnerable |
def _find_working_git(self):
test_cmd = 'version'
if app.GIT_PATH:
main_git = '"' + app.GIT_PATH + '"'
else:
main_git = 'git'
log.debug(u'Checking if we can use git commands: {0} {1}', main_git, test_cmd)
_, _, exit_status = self._run_git(main_git, t... | 0 | Python | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | vulnerable |
def _set_document_file_metadata(self):
self.file.open()
# Set new document file size
self.file_size = self.file.size
# Set new document file hash
self._set_file_hash(self.file.read())
self.file.seek(0) | 0 | Python | CWE-400 | Uncontrolled Resource Consumption | The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources. | https://cwe.mitre.org/data/definitions/400.html | vulnerable |
def _set_document_file_metadata(self):
self.file.open()
# Set new document file size
self.file_size = self.file.size
# Set new document file hash
self._set_file_hash(self.file.read())
self.file.seek(0) | 0 | Python | CWE-770 | Allocation of Resources Without Limits or Throttling | The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor. | https://cwe.mitre.org/data/definitions/770.html | vulnerable |
def get_file_hash(self):
if self.file_hash == "":
with self.open_file() as f:
self._set_file_hash(f.read())
self.save(update_fields=["file_hash"])
return self.file_hash | 0 | Python | CWE-400 | Uncontrolled Resource Consumption | The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources. | https://cwe.mitre.org/data/definitions/400.html | vulnerable |
def get_file_hash(self):
if self.file_hash == "":
with self.open_file() as f:
self._set_file_hash(f.read())
self.save(update_fields=["file_hash"])
return self.file_hash | 0 | Python | CWE-770 | Allocation of Resources Without Limits or Throttling | The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor. | https://cwe.mitre.org/data/definitions/770.html | vulnerable |
def _set_file_hash(self, file_contents):
self.file_hash = hashlib.sha1(file_contents).hexdigest() | 0 | Python | CWE-400 | Uncontrolled Resource Consumption | The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources. | https://cwe.mitre.org/data/definitions/400.html | vulnerable |
def _set_file_hash(self, file_contents):
self.file_hash = hashlib.sha1(file_contents).hexdigest() | 0 | Python | CWE-770 | Allocation of Resources Without Limits or Throttling | The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor. | https://cwe.mitre.org/data/definitions/770.html | vulnerable |
def get_file_hash(self):
if self.file_hash == "":
with self.open_file() as f:
self._set_file_hash(f.read())
self.save(update_fields=["file_hash"])
return self.file_hash | 0 | Python | CWE-400 | Uncontrolled Resource Consumption | The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources. | https://cwe.mitre.org/data/definitions/400.html | vulnerable |
def get_file_hash(self):
if self.file_hash == "":
with self.open_file() as f:
self._set_file_hash(f.read())
self.save(update_fields=["file_hash"])
return self.file_hash | 0 | Python | CWE-770 | Allocation of Resources Without Limits or Throttling | The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor. | https://cwe.mitre.org/data/definitions/770.html | vulnerable |
def _set_file_hash(self, file_contents):
self.file_hash = hashlib.sha1(file_contents).hexdigest() | 0 | Python | CWE-400 | Uncontrolled Resource Consumption | The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources. | https://cwe.mitre.org/data/definitions/400.html | vulnerable |
def _set_file_hash(self, file_contents):
self.file_hash = hashlib.sha1(file_contents).hexdigest() | 0 | Python | CWE-770 | Allocation of Resources Without Limits or Throttling | The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor. | https://cwe.mitre.org/data/definitions/770.html | vulnerable |
def _set_image_file_metadata(self):
self.file.open()
# Set new image file size
self.file_size = self.file.size
# Set new image file hash
self._set_file_hash(self.file.read())
self.file.seek(0) | 0 | Python | CWE-400 | Uncontrolled Resource Consumption | The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources. | https://cwe.mitre.org/data/definitions/400.html | vulnerable |
def _set_image_file_metadata(self):
self.file.open()
# Set new image file size
self.file_size = self.file.size
# Set new image file hash
self._set_file_hash(self.file.read())
self.file.seek(0) | 0 | Python | CWE-770 | Allocation of Resources Without Limits or Throttling | The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor. | https://cwe.mitre.org/data/definitions/770.html | vulnerable |
def to_python(self, data):
"""
Check that the file-upload field data contains a valid image (GIF, JPG,
PNG, etc. -- whatever Willow supports). Overridden from ImageField to use
Willow instead of Pillow as the image library in order to enable SVG support.
"""
f = FileF... | 0 | Python | CWE-400 | Uncontrolled Resource Consumption | The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources. | https://cwe.mitre.org/data/definitions/400.html | vulnerable |
def to_python(self, data):
"""
Check that the file-upload field data contains a valid image (GIF, JPG,
PNG, etc. -- whatever Willow supports). Overridden from ImageField to use
Willow instead of Pillow as the image library in order to enable SVG support.
"""
f = FileF... | 0 | Python | CWE-770 | Allocation of Resources Without Limits or Throttling | The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor. | https://cwe.mitre.org/data/definitions/770.html | vulnerable |
def test_split_backslash():
stmts = sqlparse.parse(r"select '\\'; select '\''; select '\\\'';")
assert len(stmts) == 3 | 0 | Python | CWE-1333 | Inefficient Regular Expression Complexity | The product uses a regular expression with an inefficient, possibly exponential worst-case computational complexity that consumes excessive CPU cycles. | https://cwe.mitre.org/data/definitions/1333.html | vulnerable |
def connect(self) -> dict:
"""
Set up the connection required by the handler.
Returns:
HandlerStatusResponse
"""
headers = {
'Content-Type': 'application/json',
}
data = '{' + f'"userName": "{self.connection_data["username"]}","passwo... | 0 | Python | CWE-311 | Missing Encryption of Sensitive Data | The product does not encrypt sensitive or critical information before storage or transmission. | https://cwe.mitre.org/data/definitions/311.html | vulnerable |
def on_file(file):
nonlocal file_object
data["file"] = file.file_name.decode()
file_object = file.file_object | 0 | Python | CWE-918 | Server-Side Request Forgery (SSRF) | The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination. | https://cwe.mitre.org/data/definitions/918.html | vulnerable |
def on_file(file):
nonlocal file_object
data["file"] = file.file_name.decode()
file_object = file.file_object | 0 | Python | NVD-CWE-noinfo | null | null | null | vulnerable |
def create(self, target: str, df: Optional[pd.DataFrame] = None, args: Optional[Dict] = None) -> None:
if 'using' not in args:
raise Exception("LlamaIndex engine requires a USING clause! Refer to its documentation for more details.")
if 'index_class' not in args['using']:
ar... | 0 | Python | CWE-918 | Server-Side Request Forgery (SSRF) | The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination. | https://cwe.mitre.org/data/definitions/918.html | vulnerable |
def create(self, target: str, df: Optional[pd.DataFrame] = None, args: Optional[Dict] = None) -> None:
if 'using' not in args:
raise Exception("LlamaIndex engine requires a USING clause! Refer to its documentation for more details.")
if 'index_class' not in args['using']:
ar... | 0 | Python | NVD-CWE-noinfo | null | null | null | vulnerable |
def select(self, query: ast.Select) -> pd.DataFrame:
conditions = extract_comparison_conditions(query.where)
urls = []
for op, arg1, arg2 in conditions:
if op == 'or':
raise NotImplementedError(f'OR is not supported')
if arg1 == 'url':
... | 0 | Python | CWE-918 | Server-Side Request Forgery (SSRF) | The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination. | https://cwe.mitre.org/data/definitions/918.html | vulnerable |
def select(self, query: ast.Select) -> pd.DataFrame:
conditions = extract_comparison_conditions(query.where)
urls = []
for op, arg1, arg2 in conditions:
if op == 'or':
raise NotImplementedError(f'OR is not supported')
if arg1 == 'url':
... | 0 | Python | NVD-CWE-noinfo | null | null | null | vulnerable |
def test_basic_init_function(get_contract):
code = """
val: public(uint256)
@external
def __init__(a: uint256):
self.val = a
"""
c = get_contract(code, *[123])
assert c.val() == 123
# Make sure the init code does not access calldata
opcodes = vyper.compile_code(code, ["opcodes"])["opcode... | 0 | Python | CWE-670 | Always-Incorrect Control Flow Implementation | The code contains a control flow path that does not reflect the algorithm that the path is intended to implement, leading to incorrect behavior any time this path is navigated. | https://cwe.mitre.org/data/definitions/670.html | vulnerable |
def set_code_offsets(vyper_module: vy_ast.Module) -> Dict:
ret = {}
offset = 0
for node in vyper_module.get_children(vy_ast.VariableDecl, filters={"is_immutable": True}):
varinfo = node.target._metadata["varinfo"]
type_ = varinfo.typ
varinfo.set_position(CodeOffset(offset))
... | 0 | Python | CWE-789 | Memory Allocation with Excessive Size Value | The product allocates memory based on an untrusted, large size value, but it does not ensure that the size is within expected limits, allowing arbitrary amounts of memory to be allocated. | https://cwe.mitre.org/data/definitions/789.html | vulnerable |
def set_code_offsets(vyper_module: vy_ast.Module) -> Dict:
ret = {}
offset = 0
for node in vyper_module.get_children(vy_ast.VariableDecl, filters={"is_immutable": True}):
varinfo = node.target._metadata["varinfo"]
type_ = varinfo.typ
varinfo.set_position(CodeOffset(offset))
... | 0 | Python | CWE-193 | Off-by-one Error | A product calculates or uses an incorrect maximum or minimum value that is 1 more, or 1 less, than the correct value. | https://cwe.mitre.org/data/definitions/193.html | vulnerable |
def set_code_offsets(vyper_module: vy_ast.Module) -> Dict:
ret = {}
offset = 0
for node in vyper_module.get_children(vy_ast.VariableDecl, filters={"is_immutable": True}):
varinfo = node.target._metadata["varinfo"]
type_ = varinfo.typ
varinfo.set_position(CodeOffset(offset))
... | 0 | Python | CWE-682 | Incorrect Calculation | The product performs a calculation that generates incorrect or unintended results that are later used in security-critical decisions or resource management. | https://cwe.mitre.org/data/definitions/682.html | vulnerable |
def append_dyn_array(darray_node, elem_node):
assert isinstance(darray_node.typ, DArrayT)
assert darray_node.typ.count > 0, "jerk boy u r out"
ret = ["seq"]
with darray_node.cache_when_complex("darray") as (b1, darray_node):
len_ = get_dyn_array_count(darray_node)
with len_.cache_when_... | 0 | Python | CWE-787 | Out-of-bounds Write | The product writes data past the end, or before the beginning, of the intended buffer. | https://cwe.mitre.org/data/definitions/787.html | vulnerable |
def make_byte_array_copier(dst, src):
assert isinstance(src.typ, _BytestringT)
assert isinstance(dst.typ, _BytestringT)
_check_assign_bytes(dst, src)
# TODO: remove this branch, copy_bytes and get_bytearray_length should handle
if src.value == "~empty":
# set length word to 0.
retu... | 0 | Python | CWE-787 | Out-of-bounds Write | The product writes data past the end, or before the beginning, of the intended buffer. | https://cwe.mitre.org/data/definitions/787.html | vulnerable |
def lookup_internal_function(self, method_name, args_ir, ast_source):
# TODO is this the right module for me?
"""
Using a list of args, find the internal method to use, and
the kwargs which need to be filled in by the compiler
"""
sig = self.sigs["self"].get(method_n... | 0 | Python | NVD-CWE-noinfo | null | null | null | vulnerable |
def build_IR(self, expr, args, kwargs, context):
placeholder_node = IRnode.from_list(
context.new_internal_variable(BytesT(128)), typ=BytesT(128), location=MEMORY
)
return IRnode.from_list(
[
"seq",
["mstore", placeholder_node, args[0]]... | 0 | Python | CWE-252 | Unchecked Return Value | The product does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions. | https://cwe.mitre.org/data/definitions/252.html | vulnerable |
def __init__(self, message="Error Message not found.", *items):
"""
Exception initializer.
Arguments
---------
message : str
Error message to display with the exception.
*items : VyperNode | Tuple[str, VyperNode], optional
Vyper ast node(s), o... | 0 | Python | CWE-667 | Improper Locking | The product does not properly acquire or release a lock on a resource, leading to unexpected resource state changes and behaviors. | https://cwe.mitre.org/data/definitions/667.html | vulnerable |
def validate_identifier(attr):
if not re.match("^[_a-zA-Z][a-zA-Z0-9_]*$", attr):
raise StructureException(f"'{attr}' contains invalid character(s)")
if attr.lower() in RESERVED_KEYWORDS:
raise StructureException(f"'{attr}' is a reserved keyword") | 0 | Python | CWE-667 | Improper Locking | The product does not properly acquire or release a lock on a resource, leading to unexpected resource state changes and behaviors. | https://cwe.mitre.org/data/definitions/667.html | vulnerable |
def on_part_end(self) -> None:
message = (MultiPartMessage.PART_END, b"")
self.messages.append(message) | 0 | Python | CWE-400 | Uncontrolled Resource Consumption | The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources. | https://cwe.mitre.org/data/definitions/400.html | vulnerable |
def on_part_begin(self) -> None:
message = (MultiPartMessage.PART_BEGIN, b"")
self.messages.append(message) | 0 | Python | CWE-400 | Uncontrolled Resource Consumption | The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources. | https://cwe.mitre.org/data/definitions/400.html | vulnerable |
def on_part_data(self, data: bytes, start: int, end: int) -> None:
message = (MultiPartMessage.PART_DATA, data[start:end])
self.messages.append(message) | 0 | Python | CWE-400 | Uncontrolled Resource Consumption | The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources. | https://cwe.mitre.org/data/definitions/400.html | vulnerable |
def on_header_field(self, data: bytes, start: int, end: int) -> None:
message = (MultiPartMessage.HEADER_FIELD, data[start:end])
self.messages.append(message) | 0 | Python | CWE-400 | Uncontrolled Resource Consumption | The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources. | https://cwe.mitre.org/data/definitions/400.html | vulnerable |
def on_header_value(self, data: bytes, start: int, end: int) -> None:
message = (MultiPartMessage.HEADER_VALUE, data[start:end])
self.messages.append(message) | 0 | Python | CWE-400 | Uncontrolled Resource Consumption | The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources. | https://cwe.mitre.org/data/definitions/400.html | vulnerable |
def __init__(
self, headers: Headers, stream: typing.AsyncGenerator[bytes, None]
) -> None:
assert (
multipart is not None
), "The `python-multipart` library must be installed to use form parsing."
self.headers = headers
self.stream = stream
self.messa... | 0 | Python | CWE-400 | Uncontrolled Resource Consumption | The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources. | https://cwe.mitre.org/data/definitions/400.html | vulnerable |
def on_end(self) -> None:
message = (MultiPartMessage.END, b"")
self.messages.append(message) | 0 | Python | CWE-400 | Uncontrolled Resource Consumption | The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources. | https://cwe.mitre.org/data/definitions/400.html | vulnerable |
def on_headers_finished(self) -> None:
message = (MultiPartMessage.HEADERS_FINISHED, b"")
self.messages.append(message) | 0 | Python | CWE-400 | Uncontrolled Resource Consumption | The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources. | https://cwe.mitre.org/data/definitions/400.html | vulnerable |
def on_header_end(self) -> None:
message = (MultiPartMessage.HEADER_END, b"")
self.messages.append(message) | 0 | Python | CWE-400 | Uncontrolled Resource Consumption | The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources. | https://cwe.mitre.org/data/definitions/400.html | vulnerable |
def form(self) -> AwaitableOrContextManager[FormData]:
return AwaitableOrContextManagerWrapper(self._get_form()) | 0 | Python | CWE-400 | Uncontrolled Resource Consumption | The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources. | https://cwe.mitre.org/data/definitions/400.html | vulnerable |
async def _get_form(self) -> FormData:
if self._form is None:
assert (
parse_options_header is not None
), "The `python-multipart` library must be installed to use form parsing."
content_type_header = self.headers.get("Content-Type")
content_ty... | 0 | Python | CWE-400 | Uncontrolled Resource Consumption | The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources. | https://cwe.mitre.org/data/definitions/400.html | vulnerable |
def execute(self):
# clean up tmp extraction folder
if os.path.exists(TEMP_EXTRACTION_PATH) and not CleanupDir(TEMP_EXTRACTION_PATH).run():
logger.error('Could not clean temp folder')
raise IOError
# untar the package into tmp folder
with closing(tarfile.open... | 0 | Python | CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the... | https://cwe.mitre.org/data/definitions/22.html | vulnerable |
def open(self, *args, **kwargs):
"""Websocket connection opened.
Call our terminal manager to get a terminal, and connect to it as a
client.
"""
# Jupyter has a mixin to ping websockets and keep connections through
# proxies alive. Call super() to allow that to set u... | 0 | Python | CWE-306 | Missing Authentication for Critical Function | The product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources. | https://cwe.mitre.org/data/definitions/306.html | vulnerable |
def __init__(self, path):
self.path = path | 0 | Python | CWE-732 | Incorrect Permission Assignment for Critical Resource | The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors. | https://cwe.mitre.org/data/definitions/732.html | vulnerable |
def _write(self, contents: dict):
LOGGER.debug(f'Writing to {self.path}')
with open(self.path, 'w') as fp:
fp.write(json.dumps(contents)) | 0 | Python | CWE-732 | Incorrect Permission Assignment for Critical Resource | The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors. | https://cwe.mitre.org/data/definitions/732.html | vulnerable |
def secret_path(monkeypatch, tmp_path):
secret_path = str(tmp_path / '.test')
monkeypatch.setattr(auth, 'SECRET_FILE_PATH', secret_path)
yield secret_path | 0 | Python | CWE-732 | Incorrect Permission Assignment for Critical Resource | The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors. | https://cwe.mitre.org/data/definitions/732.html | vulnerable |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.