Language: Python
Label: vulnerable
CWE: CWE-863 \u2014 Incorrect Authorization
The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions.

Code:
        def update_bundles(inner_bundles: Set[Tuple[int, datetime, int]]):
            for (bundle_id, date_added, file_id) in inner_bundles:
                used_artifact_bundles[bundle_id] = date_added
                bundle_file_ids.add(file_id)