Discovery Contract

Published
Length
3 min read

Luis Felipe Dias

All posts

A discovery contract is a short, scoped agreement that funds initial system and architecture checks. Teams use it to inspect live databases and servers before signing a full project deal. During this phase, outside contractors or internal auditors often request broad login roles to move fast. Granting wide permissions for a short study exposes live tables, secrets, and customer records to risk. How a discovery contract scopes system roles Before any engineer inspects a system, both sides must

AI-Assisted Vulnerability Discovery + Smart Contract Security: the complete guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free white paper. No spam. Unsubscribe anytime.

A discovery contract is a short, scoped agreement that funds initial system and architecture checks. Teams use it to inspect live databases and servers before signing a full project deal. During this phase, outside contractors or internal auditors often request broad login roles to move fast. Granting wide permissions for a short study exposes live tables, secrets, and customer records to risk.

How a discovery contract scopes system roles

Before any engineer inspects a system, both sides must define the exact boundaries of the review. The agreement lists which databases, servers, and cloud accounts the reviewer may touch. It also sets a strict start date and end date for all system accounts.

Platform teams usually build a temporary read role in their cloud or database console. They attach this role to an identity group created just for the review team. The role allows engineers to read schema definitions, check server metrics, and view network routes.

Good scoping keeps reviewers out of billing consoles and identity management panels. Teams also block the temporary role from writing data or changing system rules. When the discovery phase ends, an admin deletes the temporary accounts and revokes their keys.

Why temporary roles leave live data exposed

Setting up a scoped role solves the problem of who can log in. It stops reviewers from dropping tables or altering server states during their audit. It also gives the security team a clear place to shut off accounts later.

Still, a basic read role cannot control what specific queries or commands run in flight. Once a reviewer logs into a database, a read role lets them query entire tables. If a table holds customer emails, phone numbers, or card numbers, the query returns them.

Reviewers rarely need raw customer data just to check index health or table joins. Yet native database roles often bundle schema checks and row reads into the same permission. Without query inspection or field masking, a simple system check turns into a data leak risk.

AI-Assisted Vulnerability Discovery + Smart Contract Security: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Static keys and shared passwords create another gap during short project engagements. When teams hand out database passwords for a two-week review, those secrets live on laptops. Even after the contract ends, rotated passwords can break other apps if teams share credentials.

Steps to run a safe technical audit

Start by listing the exact questions the audit needs to answer about your setup. If the team only needs table sizes and query plans, block raw table reads. Export schema files or provide a sanitized database copy whenever a static snapshot works.

When reviewers must touch live systems, link their logins to their own corporate identities. Never create a shared login account that multiple consultants pass around in chat tools. Shared accounts make it impossible to see which person ran a heavy or risky command.

Next, apply data masking so queries rewrite emails, phone numbers, and national IDs in results. This lets engineers test real query paths and check data types safely. Finally, log every query and command at the statement level so auditors have a full trail.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

What should a technical discovery contract include for security?

It must list the exact target systems, allowed read actions, and account expiration dates. It should also require individual logins and forbid storing raw customer data on local machines.

Why is a read-only database role risky during a system review?

A standard read role still allows bulk selects across sensitive tables. Reviewers can pull raw emails, card numbers, and phone numbers when they only need schema details.

How do teams revoke consultant access when the discovery phase ends?

Teams should tie all access to short-lived identity sessions rather than static database keys. Disabling the user in the identity provider then stops all active and future sessions right away.

Save the open-source gateway.

hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.