{"id":13878817,"url":"https://github.com/basecamp/audits1984","last_synced_at":"2025-07-20T03:31:16.931Z","repository":{"id":37386531,"uuid":"394543153","full_name":"basecamp/audits1984","owner":"basecamp","description":"Auditing tool for Rails console sessions","archived":false,"fork":false,"pushed_at":"2024-11-14T08:59:53.000Z","size":423,"stargazers_count":372,"open_issues_count":10,"forks_count":26,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-07-18T05:34:42.397Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/basecamp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":"audits1984.gemspec","citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-10T06:05:03.000Z","updated_at":"2025-05-31T02:53:31.000Z","dependencies_parsed_at":"2023-12-24T10:21:37.222Z","dependency_job_id":"1a4d8185-b2cf-4646-97e5-5f7e370b9edc","html_url":"https://github.com/basecamp/audits1984","commit_stats":{"total_commits":29,"total_committers":4,"mean_commits":7.25,"dds":"0.13793103448275867","last_synced_commit":"4196408f7ac955be02062cc2949de546d20600e0"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/basecamp/audits1984","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basecamp%2Faudits1984","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basecamp%2Faudits1984/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basecamp%2Faudits1984/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basecamp%2Faudits1984/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/basecamp","download_url":"https://codeload.github.com/basecamp/audits1984/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basecamp%2Faudits1984/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266063099,"owners_count":23870716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-06T08:02:01.003Z","updated_at":"2025-07-20T03:31:16.914Z","avatar_url":"https://github.com/basecamp.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"[![Build Status](https://github.com/basecamp/audits1984/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/basecamp/audits1984/actions?query=branch%3Amaster)\n\n# Audits1984\n\nA simple auditing tool for [`console1984`](https://github.com/basecamp/console1984).\n\n## Installation\n\nAdd it to your `Gemfile`:\n\n```ruby\ngem 'audits1984'\n```\n\nCreate tables to store audits in the database:\n\n```sh\nrails audits1984:install:migrations\nrails db:migrate\n```\n\nMount the engine in your `routes.rb`:\n\n```ruby\nmount Audits1984::Engine =\u003e \"/console\"\n```\n\n### API-only apps or apps using `vite_rails` and other asset pipelines outside Rails\n\nIf you want to use this gem with an [API-only Rails app](https://guides.rubyonrails.org/api_app.html) or an app that's using `vite_ruby`/`vite_rails`, or some other custom asset pipeline different from Sprockets and Propshaft, you need just one more thing: configure an asset pipeline so you can serve the JavaScript and CSS included in this gem. We recommend to use [`Propshaft`](https://github.com/rails/propshaft). You simply need to add this line to your application's Gemfile:\n\n```ruby\ngem \"propshaft\"\n```\n\nThen execute\n```bash\n$ bundle install\n```\n\nAnd you should be ready to go.\n\n### Authenticate auditors\n\nBy default, the library controllers will inherit from the host application's `ApplicationController`. To authenticate auditors, you need to implement a method `#find_current_auditor` in your `ApplicationController`. This method must return a record representing the auditing user. It can be any model but it has to respond to `#name`.\n\nFor example, Imagine all the staff in your company can audit console sessions:\n\n```ruby\ndef find_current_auditor\n  Current.user if Current.user\u0026.staff?\nend\n```\n\n## Usage\n\nThe main screen lists the registered console sessions. It includes a form to filter sessions by date, and also to only show that contains sensitive accesses.\n\n![Main screen listing the registered console sessions with a filter form](docs/images/main-screen.png)\n\nYou can click on a session to see its commands and choose whether it was an appropiate console usage or not.\n\n![Audit session screen](docs/images/audit-session-screen.png)\n\nAfter making a decision on the session, you will be redirected to the next pending session, based on the filter configured in the main screen.\n\nThat is. I said it was simple.\n\n## Configuration\n\nThese config options are namespaced in `config.audits1984`:\n\n| Name                  | Description                                                  |\n| --------------------- | ------------------------------------------------------------ |\n| auditor_class         | The name of the auditor class. By default it's `::User.`     |\n| auditor_name_attribute | The attribute on the auditor class that returns the auditor's name. By default it's `:name`. |\n| base_controller_class | The host application base class that will be the parent of `audit1984` controllers. By default it's `::ApplicationController`. |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasecamp%2Faudits1984","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasecamp%2Faudits1984","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasecamp%2Faudits1984/lists"}