cookbook 'osquery', '= 1.0.1'
osquery
(17) Versions
1.0.1
-
Follow4
Install and configure osquery (osquery.io)
cookbook 'osquery', '= 1.0.1', :supermarket
knife supermarket install osquery
knife supermarket download osquery
osquery chef cookbook
- Installs, configures, and starts osquery.
- Configurations are generated based on node attributes.
Supported Platforms
- OS X
- Requires Xcode Command Line Tools
- Ubuntu
- Centos
- Redhat
General Attributes
attributes/default.rb
:
name | type | default | description |
---|---|---|---|
['osquery']['version'] |
String |
1.7.3 |
osquery version to install |
['osquery']['packs'] |
Array |
%w(incident-response osx-attacks) |
osquery packs found in files/default/packs/
|
['osquery']['pack_source'] |
String |
osquery |
Cookbook to load osquery packs from |
['osquery']['repo']['checksum6'] |
String |
- | SHA256 Hash of the centos6 repo |
['osquery']['repo']['checksum7'] |
String |
- | SHA256 Hash of the centos7 repo |
Configuration Attributes
attributes/config.rb
:
name | type | default | description |
---|---|---|---|
['osquery']['options']['config_plugin'] |
String |
filesystem |
configuration plugin |
['osquery']['options']['logger_plugin'] |
String |
filesystem |
logger plugin |
['osquery']['options']['logger_path'] |
String |
/var/log/osquery |
path to store osquery logs |
['osquery']['options']['schedule_splay_percent'] |
Fixnum |
10 |
query schedule splay percentage |
['osquery']['options']['events_expiry'] |
Fixnum |
3600 |
timeout to expire eventing pubsub results |
['osquery']['options']['verbose'] |
Boolean |
false |
enable verbose informational messages |
['osquery']['options']['worker_threads'] |
Fixnum |
2 |
number of work dispatch threads |
['osquery']['options']['enable_monitor'] |
Boolean |
false |
enable schedule monitor |
Query Schedule Attributes
attributes/schedule.rb
:
name | type | default | description |
---|---|---|---|
['osquery']['schedule'] |
Hash |
- | osquery schedule |
File Integrity Monitoring Attributes
attributes/file_paths.rb
:
name | type | default | description |
---|---|---|---|
['osquery']['file_paths'] |
Hash |
- | file paths to monitor events from |
Custom Resources
osquery_conf
: creates osquery config from selected options and packs.
create
:
osquery_conf osquery_config_path do action :create schedule node['osquery']['schedule'] fim_paths node['osquery']['file_paths'] packs node['osquery']['packs'] pack_source node['osquery']['pack_source'] end
delete
:
osquery_conf 'delete osquery config' do action :delete end
osquery_conf attributes:
* action: :create
or :delete
* schedule: (required) Hash of scheduled queries to run
* fim_paths: (optional) Hash of file integrity monitoring path descriptions and array of their paths
* packs: (optional) List of osquery packs to install. Based on filenames ending in *.conf
in pack_source/packs
* pack_source: (optional) Cookbook source for osquery packs
* The daemon configuration is compiled from the node['osquery']['options']
attributes.
Testing
Run $ rake
to execute:
* foodcritic
* rubocop
* chefspec
Prerequisite: Virtualbox with Extension Pack (for os x)
* $ kitchen list
to show integration test suites <br />
* $ kitchen converge
to run test suites
Usage
- Include
osquery
in your node'srun_list
- Override attributes to fit your desired setup
Contributing
- Fork the repository on Github.
- Create a named feature branch (like
add_component_x
). - Write your change.
- Write tests for your change.
- Run the tests, ensuring they all pass (
rubocop; rspec
). - Submit a Pull Request using Github.
License and Authors
- Authors: Jack Naglieri (jacknagzdev@gmail.com)
Copyright 2013-2014 Jack Naglieri <jacknagzdev@gmail.com> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Dependent cookbooks
homebrew >= 0.0.0 |
apt >= 0.0.0 |
compat_resource >= 0.0.0 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
osquery CHANGELOG
This file is used to list changes made in each version of the osquery cookbook.
0.1.0
- [jack naglieri] - Initial release of osquery
0.2.0
- [jack naglieri] - Dynamic osquery config template
Check the Markdown Syntax Guide for help with Markdown.
The Github Flavored Markdown page describes the differences between markdown on github and standard markdown.
Foodcritic Metric
1.0.1 failed this metric
FC024: Consider adding platform equivalents: /tmp/cook/c41afd9ee84185ccbf76ee17/osquery/libraries/helpers.rb:17
FC024: Consider adding platform equivalents: /tmp/cook/c41afd9ee84185ccbf76ee17/osquery/libraries/helpers.rb:26
FC024: Consider adding platform equivalents: /tmp/cook/c41afd9ee84185ccbf76ee17/osquery/libraries/helpers.rb:35
FC024: Consider adding platform equivalents: /tmp/cook/c41afd9ee84185ccbf76ee17/osquery/recipes/audit.rb:40
1.0.1 failed this metric
FC024: Consider adding platform equivalents: /tmp/cook/c41afd9ee84185ccbf76ee17/osquery/libraries/helpers.rb:26
FC024: Consider adding platform equivalents: /tmp/cook/c41afd9ee84185ccbf76ee17/osquery/libraries/helpers.rb:35
FC024: Consider adding platform equivalents: /tmp/cook/c41afd9ee84185ccbf76ee17/osquery/recipes/audit.rb:40