safe_bro 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c4906ce3efcad72d1fe0d51afcd111672739b28a722a4745bf4b012b8f611fda
4
- data.tar.gz: ba294a2ffd0d1434f2dd99463a6f858fc8ea1be017dcd0a17217d199726d4a6c
3
+ metadata.gz: f0dca904398773a1fab1742da124c6d90dce7448ab51f97a6affa2df152aba70
4
+ data.tar.gz: 3e391dd86e14a9f8dfad4d47ef1887eb3ea8bbb5b9665282f598a64ed2939483
5
5
  SHA512:
6
- metadata.gz: 38c8fc9959f76ccc547f8a7aa661a36270a1239a1a53c6c8c75816e88516fd46dc1e33ac9f5b0d373102de83479c801eec7de54f42acc0631985655bebabbe39
7
- data.tar.gz: e1d93726cfd4dde7107fd6f0abbc1cd08144203657178e04dfa139d313720909373bd57f71b1bff5507fa25f5d6d3dca31b105a0e1ffd38b722abf37b7c29557
6
+ metadata.gz: 7cc7293d600d9796449ae72f4a96510e7aec5ea563c559a43e25b62e64d41fc66801ccc8c6f619b0bb3ffd16f2f3d2d86de56502086219c123d3e44e21485d0e
7
+ data.tar.gz: 616249c036d3a46b7b9866ae7c35937cc27840c6b3e80d3a3356c54d52eeb9b4378d983828889a5b04d7f50a9336d9dff622e7666cade051bc97d449098bee1a
data/README.md CHANGED
@@ -200,6 +200,19 @@ Not covered: `rails dbconsole`, a raw `psql`/`mysql` session, other process mana
200
200
  - `rails runner` sessions can be recorded; notifications are `ActiveSupport::Notifications`.
201
201
  - Not carried over: Pry and other console support (SafeBro hooks IRB only).
202
202
 
203
+ ## Switching from console1984 + audits1984
204
+
205
+ 1. **Don't run both.** Both hook IRB at startup and would record every command twice, so remove `console1984` and
206
+ `audits1984` from the Gemfile when you add `safe_bro`, and remove their mount (`mount Audits1984::Engine`) and
207
+ initializer settings. `bin/rails g bro_hub:install --remove-direct-mounts` only retires SafeBro/EnvBro mounts, so do this by hand.
208
+ 2. **Existing audit data stays where it is.** SafeBro uses its own `safe_bro_*` tables and doesn't read console1984's
209
+ (`console1984_*`, `audits1984_*`). Nothing is migrated: the old sessions can't be reviewed in SafeBro's UI.
210
+ Keep the old tables (read them from a console or SQL) for as long as you need the history, then drop them in a migration.
211
+ Sessions already encrypted with Active Record Encryption need those keys for as long as you keep them.
212
+ 3. Map the settings: console1984's `protected_environments` → the same option in SafeBro
213
+ in `config/initializers/safe_bro.rb`; audits1984's auditor check → `config.can_audit`.
214
+ 4. Set `CONSOLE_USER` for everyone (see above), then run `bin/rails g safe_bro:install` and `bin/rails db:migrate`.
215
+
203
216
  ## Development
204
217
 
205
218
  ```sh
@@ -13,7 +13,7 @@ module SafeBro
13
13
  desc "Sets up the BroHub dashboard (the review UI lives in it), adds the SafeBro initializer and copies the migrations."
14
14
 
15
15
  def copy_initializer
16
- copy_file "safe_bro.rb", "config/initializers/safe_bro.rb"
16
+ copy_config_once "safe_bro.rb", "config/initializers/safe_bro.rb"
17
17
  end
18
18
 
19
19
  def copy_migrations
@@ -1,3 +1,3 @@
1
1
  module SafeBro
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: safe_bro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ruby Dev SRL
@@ -43,14 +43,14 @@ dependencies:
43
43
  requirements:
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: '0.1'
46
+ version: 0.1.1
47
47
  type: :runtime
48
48
  prerelease: false
49
49
  version_requirements: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: '0.1'
53
+ version: 0.1.1
54
54
  description: Records Rails console sessions (who, why, what), asks for a justification
55
55
  before sensitive data is touched, blocks tampering and risky methods, and ships
56
56
  a mountable engine where auditors review sessions. One gem instead of console1984