When a former contractor leaves a personal access token in a CI pipeline, a rogue command can run on production servers without anyone noticing. The same risk appears when an over‑scoped service account executes arbitrary scripts in response to a webhook. In both cases the organization loses visibility into who ran what code and whether personal data was exposed.
Brazil’s General Data Protection Law (LGPD) treats code execution that touches personal information as a high‑risk activity. The regulation demands that any processing of personal data be accompanied by clear accountability, auditability, and safeguards that limit unnecessary exposure. For a software team, that means the team authorizes every script, build step, or remote command, protects the data it accesses, and can replay the activity for an audit.
What lgpd requires for code execution logging
LGPD’s core principles relevant to code execution are:
- Accountability: Organizations must demonstrate that they have implemented technical and administrative measures to protect personal data.
- Transparency: Data subjects have the right to know how their data is processed, including who initiated the processing.
- Security: Reasonable safeguards must be in place to prevent unauthorized access, alteration, or disclosure.
- Auditability: Controllers must retain evidence of processing activities for the period required by law.
When code runs against a database, a container, or a remote host, each of those principles translates into concrete technical controls: immutable logs of the command, contextual user identity, just‑in‑time approval for risky operations, and real‑time redaction of any personal fields that appear in output.
Why typical setups fall short
Most teams rely on static credentials stored in CI secrets managers, long‑lived SSH keys, or service accounts with broad permissions. Those mechanisms satisfy the setup requirement – they identify who is making a request and whether the request is allowed to start. However, they do not enforce any controls on the data path itself. The request travels directly to the target host, and the host sees the raw command and its results. Consequently:
- There is no guaranteed record of the exact command line or the data returned.
- Developers may inadvertently print sensitive fields to logs or console output, exposing them without protection.
- Engineers may execute risky commands without a human review, even if policy demands one.
- Auditors cannot replay a session because the gateway never captures the traffic.
In short, the setup alone does not provide the enforcement outcomes that LGPD expects.
Placing enforcement in the data path
The only reliable way to satisfy LGPD’s accountability and auditability clauses is to insert a control layer that sits between the identity provider and the target resource. That layer must be the sole place where policy decisions are enforced, because the target itself cannot be trusted to apply organization‑wide masking or approval rules consistently.
hoop.dev fulfills that role. It acts as an identity‑aware proxy that terminates the user’s OIDC or SAML token, extracts group membership, and then forwards the request to the underlying service. All traffic passes through hoop.dev, so every command, response, and error is visible to the gateway.
How hoop.dev generates evidence for lgpd
When a developer runs psql against a PostgreSQL instance through hoop.dev, the gateway records the session start, the exact SQL statement, and the identity of the caller. If the statement returns rows that contain personal data, hoop.dev can mask those fields in real time, ensuring that downstream logs never contain raw identifiers. The session records allow auditors to replay the activity and verify that only authorized data was accessed.
