pry-syslog 0.1.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: acff7ee96bc71e35a93fdcaa2b8f0bc12025e2cf
4
- data.tar.gz: b1f93e92354aacae2a4135c942c3ef2bcb9978e4
3
+ metadata.gz: 0c26780df8d5d63c6ad8782ed0a3963bd552a0c9
4
+ data.tar.gz: c230a4c04900c15074916371be94a059f27756b7
5
5
  SHA512:
6
- metadata.gz: 2a3cc4526a9484d6ce9e5200db3f34329e7c9ca847a66df391ec738aa07be32439762ea730e1668723ee79cf5b4dbe5c46aa347fce901b9c29de95b42668a8d6
7
- data.tar.gz: 2c0a59f11916d2a64d82cb8fef0de7b3b9337a42b3626e996d768b231e395f214ff1246e087c25316554922ace5a0322699700d2c0071ee26eda7f2820263c04
6
+ metadata.gz: 6837aa8694dd31a3012cdd128f0d403900e8e7aae244bfc45b7cc1d1368216fe31f425778a66d1ca7d66120ae849a15c77688dd912a46dfcd232d68193ba9285
7
+ data.tar.gz: 439e20423e492207ea1e2f4ae4fbde7efaac3284bc3f8cfe5a452c2554040f0e487e37d2f12528a74a855ac9ce335a982885348547a04e58d64df7f2fa3e7a69
data/README.md CHANGED
@@ -1,11 +1,23 @@
1
1
  # PrySyslog
2
2
 
3
+ This Pry plugin was originally written to solve an auditing issue in production
4
+ instances. Using auditd we're able to log all commands executed, but that only
5
+ extends to the application that was executed (which for pry is ruby). Relying
6
+ exclusively on .pry_history files for auditing wasn't sufficient.
7
+
8
+ This gem will log all valid Ruby executed in a pry session to syslog at the
9
+ 'info' message level on the 'local1' logging facility. Additionally the custom
10
+ app name of 'pry_history' will be used. This isn't currently configurable.
11
+
12
+ This plugin is non-invasive to anything pry related as it makes use of Pry's
13
+ native exposed hooks.
14
+
3
15
  ## Installation
4
16
 
5
17
  Add this line to your application's Gemfile:
6
18
 
7
19
  ```ruby
8
- gem 'pry_syslog'
20
+ gem 'pry-syslog'
9
21
  ```
10
22
 
11
23
  And then execute:
@@ -18,6 +30,18 @@ Or install it yourself as:
18
30
 
19
31
  ## Usage
20
32
 
33
+ When this gem is installed anytime Pry gets executed from any context it will
34
+ automatically detect and load this plugin. When this happens you will see a
35
+ note like the following indicating the session is being logged:
36
+
37
+ ```
38
+ [user@host ~/] $ pry
39
+ Please note: This interactive session has PrySyslog enabled. All
40
+ valid Ruby entered here will be sent to Syslog before being executed
41
+ for auditing purposes.
42
+ [1] pry(main)>
43
+ ```
44
+
21
45
  ## Contributing
22
46
 
23
47
  I welcome new ideas, bug fixes and comments from anyone and strive to take no
@@ -1,5 +1,5 @@
1
1
  # :nodoc:
2
2
  module PrySyslog
3
3
  # The current version of PrySyslog
4
- VERSION = '0.1.0'
4
+ VERSION = '1.0.0'
5
5
  end
data/lib/pry-syslog.rb CHANGED
@@ -5,7 +5,9 @@ require 'syslog/logger'
5
5
  # Parent namespace of the pry-syslog gem.
6
6
  module PrySyslog
7
7
  def self.announce_logging
8
- puts 'All commands executed in this session will be logged to syslog.'
8
+ puts 'Please note: This interactive session has PrySyslog enabled. All'
9
+ puts 'valid Ruby entered here will be sent to Syslog before being executed'
10
+ puts 'for auditing purposes.'
9
11
  end
10
12
 
11
13
  def self.log_code_execution(code)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pry-syslog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Stelfox