Skip to content

Building 70 Projects ranging from beginner to advanced so anyone can — learn from, build upon, use as a reference, or even copy directly. Owned by my cybersecurity company 👇

541 B
Raw Blame
"""
©AngelaMos | 2026
__init__.py
"""

from typing import Protocol

from not_sandboxed.context import Context
from not_sandboxed.policy import Policy
from not_sandboxed.verdict import Finding


class Layer(Protocol):
    """
    One inspection stage, which reports what it found and never
    decides what to do about it
    """

    name: str

    def inspect(
        self,
        ctx: Context,
        policy: Policy,
    ) -> list[Finding]:
        """
        Report every rule that fired against this context
        """
        ...