Logging and audit
"Every access must be logged" is the first security requirement an enterprise customer writes down, and the one most products answer with a web-server log that names no one. CoverOps keeps two records, both designed to be read by an auditor and shipped to a SIEM:
- the access log: one line per request, naming the authenticated actor;
- the audit log: one event per action that matters, kept in the database, visible in the dashboard, exportable.
Together with the identity provider's own sign-in log, they answer the SOC 2 questions: who could access the system, who did, what they changed, and whether anyone tried who should not have.
The access log
Every request to the API (dashboard, agents, link tokens, SCIM) produces one
JSON line after the response is finished, so the actor is whoever
authentication actually resolved, not whoever was claimed. Two exceptions:
/health is never logged, and the agents' run poll (/v1/agent/run/active,
answered every few seconds per shard) is logged only when it fails, so a day
of log is not a hundred thousand identical lines.
{"ts":"2026-10-04T07:12:41.210Z","kind":"access","request_id":"5b1c…",
"method":"GET","path":"/v1/workspace/audit","query":"days=30",
"status":200,"duration_ms":18,"bytes":4211,
"ip":"10.20.1.14","forwarded_for":"203.0.113.9, 10.20.1.14",
"user_agent":"Mozilla/5.0 …","actor":"user:3f0e…","actor_email":"ayse@example.com",
"project_id":null,"surface":"dashboard","error_code":null}
| Field | Meaning |
|---|---|
request_id | honours an inbound X-Request-Id from your proxy, else minted; returned in the response header so a user can quote it |
actor | user:<id> for a dashboard session, agent:<id> for an agent token, anonymous otherwise |
surface | dashboard, agent, link, scim, public: which door the request came through |
error_code | for a 4xx/5xx answer, the code from its error envelope, the more specific first detail code when there is one (VALIDATION_ERROR, RECAPTCHA_SCORE, RECAPTCHA_FAILED, UNAUTHORIZED, RATE_LIMITED, …); null for a success. Only the code, never the message, which can repeat what the caller sent |
ip / forwarded_for | the socket peer and the X-Forwarded-For chain; trust proxy is on, so ip is the client when your proxy sets the header |
query | the query string with credential keys (token, code, state, …) blanked; the live feed authenticates by query string, and that value must never land in a log |
Never logged: request bodies, Authorization headers, cookies, token values.
/health is skipped.
Two warning lines explain a refused sign-in, registration or access request
beyond its error_code (both on the API's standard error output):
[recaptcha] refused action=register code=RECAPTCHA_SCORE score=0.3 hostname=coverops.ai google=- min=0.7 token_action=register
[auth] validation refused POST /v1/auth/access-request fields=email,name request_id=5b1c…
The first is written for every reCAPTCHA refusal (RECAPTCHA_REQUIRED,
_FAILED, _HOST, _ACTION, _SCORE, _UNAVAILABLE) and carries only
Google's verdict: the score, the host and action the token was solved for,
and Google's error-codes (- when Google said nothing about one). The
second names the form fields a schema check refused on /v1/auth/*. Neither
carries the token, the email, the password or any other value the caller
sent; join them to the access-log line by time, or by request_id.
Where it goes is set by COVEROPS_ACCESS_LOG in coverops.env:
| Value | Use when |
|---|---|
stdout (default) | the platform collects container output: Docker json-file/journald/syslog/fluentd/awslogs/gelf drivers, Kubernetes, ECS, Azure Container Insights |
file | a host agent (Filebeat, Fluent Bit, the Splunk forwarder, Azure Monitor agent) tails files; written to ACCESS_LOG_DIR/access.log |
off | the edge proxy's log is the system of record and you do not want two |
Shipping to a SIEM is a logging-driver setting, not a product one. Examples:
# docker-compose.override.yml — syslog to the corporate collector (TLS)
services:
api:
logging:
driver: syslog
options:
syslog-address: "tcp+tls://siem.example.com:6514"
tag: "coverops-api"
# Fluent Bit tailing the file sink
[INPUT] name tail path /srv/coverops/logs/access.log parser json tag coverops.access
Retention and integrity of the access log are the collector's: ship it off
the host promptly, keep it append-only there (S3 Object Lock, Azure immutable
blobs, the SIEM's own retention), and keep the host clock on NTP. The product
does not rotate the file sink; use logrotate with copytruncate or prefer
stdout.
The audit log
Actions that change who can do what, change how the product measures or alerts, move a credential, or take data out are recorded in the database and shown under Audit log (readable by every role, changeable by no one through the product). The row follows the shape enterprise reviewers already know from GitHub's enterprise audit log and GitLab's audit events, and the "when, where, who, what" of the OWASP Logging Cheat Sheet:
| Field | Meaning |
|---|---|
created_at | when, in UTC |
actor_email | who: the person, or a machine actor (scim, sso, agent:<name>, link_token:<prefix>, resources.cunda.ai, cunda-installer); kept verbatim so a deleted account's history still reads |
action | a stable area.object.verb key (catalogue below) |
target | what it was about: a name, a prefix, an id |
| project | which project it belongs to; account events (sign-ins, API tokens) have none |
ip | the client address as the API saw it (trust proxy on, one hop) |
user_agent | the client's User-Agent; for dashboard actions, the browser's (the dashboard server passes it on) |
request_id | the same id as the request's access-log line and its X-Request-Id response header — the join between the two logs, and to your proxy's log when it sets the header |
metadata | structured detail. For an update: changed (every field that moved), before and after (their old and new values). via names the credential when it was not a dashboard session: api_token:<id>, mcp:api_token:<id>, agent:<id>, link_token:<prefix> |
Click a row on the Audit log page to see its user agent, request id and metadata. The CSV and JSON exports carry the same columns.
Secrets never enter a row. Tokens, passwords, API keys, client secrets,
private keys, SMTP URLs and webhook URLs (a Slack, Teams or generic webhook
address is the credential) are recorded only as set, changed or
cleared. A connection test records ok and, when the far end answered,
its HTTP status — never the address it called. As a second line of
defence every row is scrubbed on write: credential-named keys keep only
those markers, and values shaped like a credential (a user:password@ in a
URL, ?token=, a CoverOps, GitHub, GitLab, Slack or OpenAI-style key, a JWT,
a PEM private key, a Slack/Teams webhook) are replaced.
Event catalogue
Project-scoped events appear in that project's log; account events (no project) appear in the log of every project whose team the actor is on.
| Area | Events |
|---|---|
| Sign-in and account (account events) | auth.login, auth.login.failed, auth.login.throttled, auth.two_step.failed, auth.sso.login, auth.sso.login.failed, auth.saml.login, auth.saml.login.failed, auth.saml.link, auth.saml.link.failed, auth.register, auth.access.requested, auth.email.verified, auth.password.set, auth.password.change, auth.two_step.enable, auth.two_step.disable |
| Identity configuration | auth.sso.config (changed fields with before/after; the client secret only as changed), auth.saml.config.create, auth.saml.config.update (before/after; certificates as fingerprints, the SP key never), auth.saml.metadata.import, auth.saml.config.delete, auth.saml.test, auth.scim.token.mint, auth.scim.token.revoke. The SAML events are filed on the account's first project, so its team sees its own IdP's sign-ins and failures |
Provisioning (actor scim) | scim.user.create, scim.user.update, scim.user.disable, scim.user.enable |
| API tokens (account events) | api.token.mint, api.token.revoke |
| Team | member.add, member.account_opened, member.setup_link, member.role (before/after), member.remove, member.accept, member.decline |
| Projects | project.create, project.monitoring.update (watched services and repositories, before/after) |
| Monitoring and runs | monitoring.start, monitoring.stop, monitoring.resume, run.finish, run.delete |
| Agents | agent.create, agent.delete, agent.token.rotate, agent.settings.update (before/after) |
| Source code | security.source_upload (the upload policy, before/after), source.upload (actor agent:<name>: file count, repository, commit — never the text) |
| Coverage rules and gates | coverage.exclusions.update, gate.create, gate.update, gate.delete, flaky.quarantine, flaky.release, flaky.auto_release (from the dashboard or from CI, actor agent:<name>) |
| KPIs and notifications | kpi.targets.update (each threshold before/after), kpi.alerts.purge, kpi.retention.update (days before/after), kpi.view.save, kpi.view.delete, notification.channel.create, notification.channel.update, notification.channel.delete, notification.channel.test |
| Impact and the code map | impact.selection_policy.update, impact.config.update, code_map.rebuild |
| Repositories and git hosts | repository.create, repository.update, repository.delete, repository.test, git.connection.create, git.connection.delete, git.connection.test, git.connection.repositories.link, git.connection.oauth.start, git.connection.oauth, git.connection.oauth.failed — filed under the person's own project (repositories belong to the account and only its own projects read them) |
| Integrations | connector.config.create, connector.config.update (changed fields; keys only as set/changed), connector.test, integration.oauth.start, integration.oauth, integration.oauth.failed, ai.provider.save, ai.provider.delete, ai.provider.test |
| ReplayOps link | link.replay_template.update, link.token.create, link.token.revoke (by prefix), link.pair (actor link_token:<prefix>) |
| Assistants (MCP, write scope) | mcp.notify, mcp.rebuild_code_graph, mcp.start_coverage_monitoring, mcp.stop_coverage_monitoring |
| Sandbox | sandbox.kit (the kit download), sandbox.revoke, sandbox.delete |
| Data leaving the product | audit.export, sandbox.kit, platform.licence.usage_download |
| Inbox | demo_request.update |
| Installation setup | setup.licence, setup.account, setup.llm, setup.llm.models, setup.mail, setup.skip, install.llm.save, install.llm.clear, install.llm.models, install.mail.save, install.mail.clear, licence.setup.* (the Cunda installer) |
| Operator (super admin) | platform.user.create, platform.user.setup_link, platform.user.add_to_company, platform.user.update, platform.user.company_role, platform.user.remove_from_company, platform.user.disable, platform.user.enable, platform.user.delete, platform.super_admin.grant, platform.super_admin.revoke, platform.account.approve, platform.account.reject, platform.registration.update, platform.recaptcha.update, platform.recaptcha.test, platform.plan.update, platform.demo_request.update, platform.blog.create, platform.blog.update, platform.blog.delete |
| Partner portal | partner.cunda.denied, partner.cunda.organizations.search, partner.cunda.package.update, partner.cunda.usage.read |
Deliberately not audit events — the access log has every one of them, with the same request id an audit row would carry:
- Agent traffic: coverage ingest (
/v1/agent/runs/*), heartbeats, the run poll, and the CI selection call (/v1/agent/select, whose answers are kept in their own table for the savings report). This is machine traffic at machine volume, not a governance decision. POST /v1/auth/refresh: a session renewing itself.- Reads: dashboard pages,
POST /v1/impact/planand the code map's questions (/v1/code-graph/structure/ask), which only ask; viewing source in the dashboard. Reports a browser saves as a file are built from data the page already read. - The KPI alert log's own rows: the server's evaluator writes one when a KPI changes state, and the log is itself the record of the breach.
- Switching which project is open (
POST /v1/workspace/projects/:id/select): a screen preference. - Signing out: sessions are signed tokens with no server-side state to
revoke; they lapse after
ACCESS_TOKEN_TTL. - Public downloads of the agent packages, which carry no identity.
Deleting a project
A project's trail outlives the project. The audit row keeps the project's id
as a plain column (no cascading foreign key) and a snapshot of its name, so
deleting a project — today, removing a sandbox — leaves its rows in place.
They are deliberately not turned into project-less rows: an event without
a project is an account event, shown to every team its actor is on, and a
deleted project's agent names or connector changes would then appear in
another company's log. Instead, a project that no longer exists has no tenant
view at all; its rows are read in the operator's log (Platform → Audit,
/v1/platform/audit, which shows the snapshot name as the company), and the
retention sweep removes them by age like any other row.
Retention: COVEROPS_AUDIT_RETENTION_DAYS, where 0 (default) keeps events
forever; otherwise a daily sweep removes older ones, deleted projects'
included. Most customers keep audit events for at least a year and export
monthly.
Export: Audit log → Export CSV / Export JSON for the chosen window
(up to ten years; CSV for a spreadsheet, JSON lines for a SIEM import), with
user_agent and request_id columns. The export is itself an audit.export
event with the window and row count. Cells a spreadsheet would run as a
formula are prefixed with a quote.
Protection: the table is written only by the API; no dashboard role can edit or delete events; database access is the platform's control (see below). For tamper evidence beyond that, export daily into immutable storage, the same place the access log lands.
Known limit: actions taken in the dashboard reach the API through the
dashboard server, so their ip is that server's address on the internal
network; the browser's address is in the edge proxy's log, and the user
agent on the row is the browser's. Sign-in, SSO, SCIM, agents, the link
surface and API tokens call the API directly and carry the client address.
Brute force, sessions, and what is enforced where
- Password sign-in is throttled per source address: ten failures in fifteen
minutes and that address waits (HTTP 429 with
Retry-After), recorded asauth.login.throttled. Accounts are never locked by a guesser. - Sessions: access tokens live 1 hour (
ACCESS_TOKEN_TTL), refresh tokens 30 days (REFRESH_TOKEN_TTL); a disabled account is refused on the next request. MFA, password policy and conditional access are enforced at the identity provider; with SSO Required, that is the only door. - Agent tokens are hashed at rest and shown once; every use is an access-log line with the agent's id.
SOC 2: what the product provides, what the deployment must
A SOC 2 report is about the customer's controls; the product's job is to make them easy to evidence. This is the honest mapping, written so a reviewer can check each row.
| Trust Services Criteria | CoverOps provides | The deployment / customer provides |
|---|---|---|
| CC6.1 logical access | roles per project, super-admin flag, SSO with group-to-role mapping, SSO-only mode, hashed credentials, per-request refusal of disabled accounts | the IdP's MFA and conditional access; who is in the admin group |
| CC6.2 registration and authorization | SCIM provisioning (joiners) and deprovisioning (leavers); audit of every membership change | HR → IdP joiner/leaver process; periodic access review using the Team page or the SCIM listing |
| CC6.3 removal of access | SCIM active=false, member removal, agent token rotation; all audited | timeliness of the leaver process |
| CC6.6 / CC6.7 boundaries, transmission | TLS at the edge (built-in or yours); agents report over HTTPS; nothing leaves the network but what you allow | the certificate, the firewall, the egress allow-list |
| CC6.8 malicious software | images from a registry you control, pinned by version; the install verifies the agent packages inside the image; the bundle is checksummed | image scanning in your registry; host hardening |
| CC7.1 / CC7.2 monitoring | the access log (every request, every actor) and the audit log; /health; throttling events | the SIEM, alert rules (e.g. auth.login.failed bursts, scim.user.disable outside a sync window, audit.export), log retention |
| CC7.3 / CC7.4 incident response | request ids end-to-end; exportable logs | the runbook; who is paged |
| CC8.1 change management | versioned images; migrations that halt the API on failure; upgrade and rollback documented | the change ticket; the staging rehearsal |
| A1.2 backups and recovery | scheduled backups with off-host copies; documented restore; managed-Postgres PITR support | the restore drill, on a schedule, with evidence |
| C1.1 / C1.2 confidentiality and disposal | retention knobs for frames and audit events; deprovisioning keeps history and nothing else personal | data classification; deletion requests |
Where the product cannot help, the table says so. Two things customers often
expect of the product that live elsewhere: immutability of logs (the
collector's object lock, not a database flag) and separation of duties on
the database (the DBA's grants; the API's role should own only the coverops
database).
What to show an auditor
- The Team page: who has access and in which role; the SSO settings with Required on; the SCIM token prefix and when it was minted (audit log).
- The identity provider's assignment list for the CoverOps app.
- An audit-log export for the period, and the SIEM's retention policy for the access log.
- The last restore drill (date, backup used, time to recover).
- The version history:
COVEROPS_VERSIONchanges incoverops.envunder your change control, and the images' digests in your registry.