Skip to content

Commit

Permalink
fix audit rules
Browse files Browse the repository at this point in the history
  • Loading branch information
raianand committed Sep 5, 2024
1 parent 868211e commit cf925fd
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 11 deletions.
8 changes: 3 additions & 5 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions src/audit_rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ async function auditRulesTemplate({ homeDir, workingDir }) {
-w /etc/docker/daemon.json -p wa -k bolt_monitored_docker_daemon_changes
-w /var/log/audit/audit.log -p wa -k bolt_monitored_audit_log_changes
-e 2
`
}

Expand Down
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ async function run() {
core.info('Setting up auditd...')
const auditRules = await auditRulesTemplate({ homeDir, workingDir })
fs.writeFileSync('audit.rules', auditRules)
await exec(`sudo bash audit.sh ${isDebugMode}`)
await exec(`sudo bash audit.sh ${workingDir} ${isDebugMode}`)
core.info('Setting up auditd... done')

benchmark('setup-auditd')
Expand Down
5 changes: 3 additions & 2 deletions src/scripts/audit.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#! /bin/bash

debug=$1
workingDir=$1
debug=$2

if [[ "$debug" == "true" ]]; then
set -x
Expand All @@ -21,7 +22,7 @@ mv audit.rules /etc/audit/rules.d/
# Restart auditd service to apply the new rules
service auditd restart

auditctl -w $2 -p wa -k bolt_monitored_wd_changes
auditctl -w $workingDir -p wa -k bolt_monitored_wd_changes

auditctl -e 2

Expand Down
2 changes: 1 addition & 1 deletion src/version.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const releaseVersion = 'v1.7.0-rc.2'
const releaseVersion = 'v1.7.0-rc.3'

module.exports = {
releaseVersion
Expand Down

0 comments on commit cf925fd

Please sign in to comment.