Git Product home page Git Product logo

ash-linux-formula's People

Contributors

dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar eemperor avatar ferricoxide avatar ihenyene avatar kevinplus3 avatar lorengordon avatar mergify[bot] avatar yakdriver avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ash-linux-formula's Issues

Handler for STIG-ID V-38657 missing feature

Verify client-signing in autofs-style CIFS mounts. Not directly-specified in STIG. No relevant functions in current Saltstack module-list - probably requires fully custom code/helper-scripts to effect [do in second or third iteration of packaging SLSes]

Handler for V-38633 should be adaptive

Handler currently forces "max_log_file" value to STIG-recommended ("6"). Handler should:

  • Detect if absent. If so, determine appropriate value based on space available in /var/log/audit and set (use "6" if /var/log/audit is small). May not be doable as STIGs don't recommend a formula for determination.
  • Detect if value is set. If so, only override if existing setting is less than STIG-recommended value

Conditional fstab-updater in Handler for V-38652 doesn't work

Using the following code-segment to determine whether to update /etc/fstab (and to apply update if condition returns true):

`
# Update fstab (if necessary)
{% if salt'file.search' %}
notify_V38652-{{ mountPoint }}-remount:
cmd.run:

  • name: 'printf "\t* Updating /etc/fstab as necessary\n"'

fstab_V38652-{{ mountPoint }}:
module.run:

  • name: 'mount.set_fstab'
  • m_name: '{{ mountPoint }}'
  • device: '{{ remountDev }}'
  • fstype: '{{ fsType }}'
  • opts: '{{ optString }}'
    {% endif %}
    `

However, {% if %} statement fails to properly evaluate to "True"

Handler for STIG-ID V-38657 is not yet implemented

Need to add fstab functionality ...possibly via iterative-matching of mount.fstab function [needed in initial roll]

Need to add mtab functionality ...most likely via iterative-matching of mount.mounted function [needed in initial roll]

V38583: Failed to create hardlink on /boot/grub.conf

Seems similar to #47

      ID: file_V38583-hardlink
Function: module.run
    Name: file.link
  Result: False
 Comment: Module function file.link threw an exception. Exception: Could not create '/boot/grub.conf'
 Started: 22:00:46.043873
Duration: 0.881 ms
 Changes:   

SLS Parsing/Ordering Issue in V38501, V38573 and V38592

Description:
Due to run-time processing-precedence of Jinja-based code, the /etc/pam.d/system-auth-ac file can end up with redundant edits applied. If the named-handlers are all run as part of higher-level include - such as:

include:
- STIGbyID.cat2.V38501
- STIGbyID.cat2.V38573
- STIGbyID.cat2.V38592

Symptoms:
The edits contained within will be multiply-applied, creating a faillock-config that looks like:

# User changes will be destroyed the next time authconfig is run.
auth        required      pam_env.so
auth        required      pam_faillock.so preauth silent audit deny=3 unlock_time=900
auth        required      pam_faillock.so preauth silent audit deny=3 unlock_time=900
auth        required      pam_faillock.so preauth silent audit deny=3 unlock_time=900
auth        sufficient    pam_unix.so try_first_pass
auth        [default=die] pam_faillock.so authfail deny=3 unlock_time=900 fail_interval=900
auth        required      pam_faillock.so authsucc deny=3 unlock_time=900 fail_interval=900
auth        [default=die] pam_faillock.so authfail deny=3 unlock_time=900 fail_interval=900
auth        required      pam_faillock.so authsucc deny=3 unlock_time=900 fail_interval=900
auth        [default=die] pam_faillock.so authfail deny=3 unlock_time=900 fail_interval=900
auth        required      pam_faillock.so authsucc deny=3 unlock_time=900 fail_interval=900

The desired end-state should be:

# User changes will be destroyed the next time authconfig is run.
auth        required      pam_env.so
auth        required      pam_faillock.so preauth silent audit deny=3 unlock_time=900
auth        sufficient    pam_unix.so try_first_pass
auth        [default=die] pam_faillock.so authfail deny=3 unlock_time=900 fail_interval=900
auth        required      pam_faillock.so authsucc deny=3 unlock_time=900 fail_interval=900

Work-Around
Iterative, individual invocation of handlers will avoid the redundant edits.

Handler for V-38518 needs improved handling for configs with multiple, non-unique first-facility declarations

Script currently works fine when a logging-target's definition starts with a unique facility name (e.g., "kern"). However, if the first-defined facility-name isn't unique (specifically encountered error with "*" facility), handler will only set ownership on the last-defined logging-target that matches the facility.

Note: Handling of "*" facility is currently disabled. When the above-noted issue is fixed, add

'*',

To the facilityList list-variable.

Handler for STIG-ID V-38647 needs to more-gracefully handle multiple umask-definition lines

The /etc/profile shipped in the setup RPM has a starting umask definition-block that looks like:

if [ $UID -gt 199 ] && [ "`id -gn`" = "`id -un`" ]; then
    umask 002
else
    umask 022
fi

This handler doesn't deal with this structure very well. Currently, falls back and clobbers the above - replacing with "077". Might be better to either have the handler nuke this entire block or append a umask 077 to the file (not tidy but should override all prior umask defines).

Handler for STIG-ID V-38702 only addresses vsftpd

STIG-ID V-38702 only specifically examines and specifies fixes for vsftpd; however, other ftpds are available in the standard Enterprise Linux repos. Probably want to extend where other ftpds are available and support equivalents to the STIG-mandated logging settings.

V38581: Failed to create the hardlink for /boot/grub.conf

Having trouble following the logic in the sls, need to study it more.

          ID: file_V38581-hardlink
    Function: module.run
        Name: file.link
      Result: False
     Comment: Module function file.link threw an exception. Exception: Could not create '/boot/grub.conf'
     Started: 22:00:46.027891
    Duration: 0.881 ms
     Changes:   

Handler for STIG-ID V-38597 only handles /tmp and /var/tmp

STIG specifies a fix for an indeterminate list. The following only addresses the Linux default scratch directories /tmp and /var/tmp. Prior STIGS require looking for other objects with overly-generous permissions and resetting them. Will explore appropriate resetting permissions against an indeterminite directory-list in future iterations of this SLS.

Current fix-handler for STIG ID V-38481 can make a salt-run crash

Current rpm update method individually updates all packages listed as requiring an update via:

{% set updatePairs = salt'pkg.list_upgrades' %}

{% for pkgName in updatePairs %}
remediate_V38481-{{ pkgName }}:
pkg:

  • name: {{ pkgName }}
  • latest
    {% endfor %}

If system is kept well-patched, the number of updates is low, handler functions as expected. However, in a large update delta (e.g., as happens at a new ELx point-release) the number of items seems to exceed Salt's capacity causing the Salt-run to crash.

CCE-26762-5 butchers /etc/fstab if more more than one tmpfs filesystem is present

Due to issues in mount.mounted/mount.set_fstab (detailed in mainline salt Issue ID #17198) this handler will butcher the /etc/fstab file if there is more than one file of type 'tmpfs'.

Test systems are currently using tmpfs for both /tmp and /dev/shm: latter is required; former is best-practices for EL6 and higher.

Upstream fix to the Salt modules for mount.mounted/mount.set_fstab should fix this issue. Closure should only require verification. Per comment on original Salt Issue ID this will be in the 2015 code-trees but won't be back-ported into the 2014.7.x code-trees

Handler for V-38519 needs improved handling for configs with multiple, non-unique first-facility declarations

Script currently works fine when a logging-target's definition starts with a unique first-facility name (e.g., "kern"). However, if the first-defined facility-name isn't unique (specifically encountered error with "*" facility), handler will only set ownership on the last-defined logging-target that matches the facility.

Note: Handling of "*" facility is currently disabled. When the above-noted issue is fixed, add

'*',

To the facilityList list-variable.

Handler for V-38679 not yet implemented

Can't disable DHCP in AWS. Need to either set this as an advisory-only handler or put logic in to determine whether it's safe to summarily disable DHCP (probably phase 1 for advisory-only; phase 2+ for conditional)

Handler for STIG-ID V-38497 is not reliably executing file existence-check in proper order

Placed logic inside SLS file to check for existence of system-auth-ac file:

{% if not salt['file.file_exists'](checkFile) %}
cmd_V38497-linkSysauth:
  cmd.run:
  - name: '/usr/sbin/authconfig --update'
{% endif %}

If interpreted in order listed in SLS file, all is good. However, salt-call seems like it's doing out-of-order execution, rendering the above essentially useless. Need to force Salt to do the Right Thing.

Handler for V-38623 needs improved handling for configs with multiple, non-unique first-facility declarations

Script currently works fine when a logging-target's definition starts with a unique facility name (e.g., "kern"). However, if the first-defined facility-name isn't unique (specifically encountered error with "*" facility), handler will only set ownership on the last-defined logging-target that matches the facility.

Note: Handling of "*" facility is currently disabled. When the above-noted issue is fixed, add

'*',

To the facilityList list-variable.

CCE-26499-4 butchers /etc/fstab if more more than one tmpfs filesystem is present

Due to issues in mount.mounted/mount.set_fstab (detailed in mainline salt Issue ID #17198) this handler will butcher the /etc/fstab file if there is more than one file of type 'tmpfs'.

Test systems are currently using tmpfs for both /tmp and /dev/shm: latter is required; former is best-practices for EL6 and higher.

Upstream fix to the Salt modules for mount.mounted/mount.set_fstab should fix this issue. Closure should only require verification. Per comment on original Salt Issue ID this will be in the 2015 code-trees but won't be back-ported into the 2014.7.x code-trees

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.