Code Monkey home page Code Monkey logo

oracle-mysql-ee-5.7-cis-baseline's Issues

check 7.6 logic

Some final tests showed that all the answers it pulls back seem to be nul. Please check.

7.3 contain profile error if client.password is undefined

Applies to control 7.3:

If client password isn't defined in the my.cnf file, current logic gives a profile error:

undefined method password' for nil:NilClass`

The logic should capture this as one of the conditions for a passing test result instead of an error.

Control 1.3 - fix logic to parse array

Currently this code does not parse the history_file variable and does not test correctly:

 history_file = command("find / -name '.mysql_history'").stdout.strip.split("\n")

  describe "The MySql history file: #{history_file}" do
    subject { file(history_file.to_s) }
    its('link_path') { should eq '/dev/null' }
  end

Recommend update to:

history_file = command("find / -name '.mysql_history'").stdout.strip.split("\n")

history_file.each do |files|
  describe "The MySql history file: #{files}" do
    subject { file(files) }
    its('link_path') { should eq '/dev/null' }
  end
  only_if { os.linux? }
end

don't change desc field during skips

For the following 12 controls, when determining that the test is not applicable, do not change the desc field. only set the skip message:

2.3
5.1
5.2
5.3
5.4
5.5
5.6
5.7
5.8
5.9
8.2
9.2

3.3 logic should switch to manual review if log_error is set to none or stderr

If "select @@log_error" returns nil or "stderr", require a manual review instead:

 describe "Since the @@log_error destination is either not set or set to stderr, perform a manual review to ensure permissions on the final destination are secured."  do
      skip "Since the @@log_error destination is either not set or set to stderr, perform a manual review to ensure permissions on the final destination are secured."

Add sample data

Add folder with sample data for hardened and unhardened results

3.9, 6.5-9 Logic should switch to require manual review if nil

Applies to controls 3.3, and 6.5 through 6.9

Currently, if the "audit_"* parameters are not defined (i.e., auditing isn't installed or the profile is run against a community rather than enterprise edition, the describe block is not contained and produces a profile error, for example:
ERROR 1193 (HY000) at line 1: Unknown system variable 'audit_log_file'

If this happens, add logic similar to this:

describe "Since the audit parameter is not defined, perform a manual review to ensure auditing is configured."  do
      skip "Since the audit parameter is not defined, perform a manual review to ensure auditing is configured."

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.