Audit log for access decisions and connection settings

Open
#142 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
django, python

Research direction

Start where grant decisions and connection settings are written today, which the payload does not name, and check the Django admin registrations that currently expose those records. Add an append-only event table per workspace and record an event at each decision and settings change, keeping the earlier decision rather than overwriting it. Done when the acceptance criteria pass, including the secret-free check for webhook and API connections, and the Activity page is visible to owners and admins only.

Written by the indexing model from the issue text.

Description

area: access

Problem

Teams that turn per-job approval off (#140) use the dashboard for audit instead of approval. Today there is no history to look at. A grant keeps only its latest decision, and a connection keeps only who last changed Require approval for each job (#141). Older decisions are overwritten, and the records show only in the Django admin.

Proposal

  • An append-only audit event table per workspace. Each event records the time, the actor (a person, or "automatic" with the commit), the action, and the subject.
  • Events for:
    • grants approved, denied, or sent back to pending, by an owner or automatically,
    • connection created, edited, disconnected, or deleted, including tool list and approval setting changes,
    • members invited, role changed, or removed.
  • An Activity page in the dashboard for owners and admins, filterable by connection, job, and person.
  • Events are kept for SECONDSHIFT_RUN_RETENTION_DAYS like runs, unless a longer audit retention is set.
  • Never record credentials, URLs with tokens, or tool arguments.

Out of scope

  • Exporting to an external SIEM.
  • Tool call events, which run events already cover.

Acceptance criteria

  • Every grant decision, automatic or manual, adds an event and never overwrites an earlier one.
  • Changing a connection's approval setting or allowed tools adds an event with the actor.
  • Automatic grants (#140) record the commit that asked for them.
  • Owners and admins can see the activity list in the dashboard. Members cannot.
  • Events contain no secrets. A test checks this for webhook and API connections.

🤖 Generated with Claude Code

Dominant language
Python
Stars
1
Forks
1
Avg merge
1h 9m
Merged PRs (30d)
322

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from piotrekno1/second-shift

All issues in piotrekno1/second-shift

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.