diff --git a/badges/coverage.svg b/badges/coverage.svg
index 7b376a8..fc87312 100644
--- a/badges/coverage.svg
+++ b/badges/coverage.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/dist/index.js b/dist/index.js
index 5c93279..2998c29 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -127893,23 +127893,27 @@ function resultToRow(result) {
}
async function generateSummary() {
+ const isDebugMode = process.env.DEBUG === 'true' ? 'true' : 'false'
const outputFile = core.getState('outputFile')
const homeDir = core.getState('homeDir')
const boltUser = core.getState('boltUser')
const egressRulesYAML = YAML.stringify(egressRules)
- // Upload auditd log file to artifacts
const artifactClient = new DefaultArtifactClient()
- const artifactName = 'bolt-auditd-log'
- const files = ['/var/log/audit/audit.log']
- const { id, size } = await artifactClient.uploadArtifact(
- artifactName,
- files,
- '/var/log/audit'
- )
- core.info(`Created bolt auditd log artifact with id: ${id} (bytes: ${size}`)
+ if (isDebugMode === 'true') {
+ // Upload auditd log file to artifacts
+ const artifactName = 'bolt-auditd-log'
+ const files = ['/var/log/audit/audit.log']
+
+ const { id, size } = await artifactClient.uploadArtifact(
+ artifactName,
+ files,
+ '/var/log/audit'
+ )
+ core.info(`Created bolt auditd log artifact with id: ${id} (bytes: ${size}`)
+ }
await exec(
`${homeDir}/auparse -format=json -i -out audit.json -in /var/log/audit/audit.log `
diff --git a/src/summary.js b/src/summary.js
index a03c730..ebac264 100644
--- a/src/summary.js
+++ b/src/summary.js
@@ -47,23 +47,27 @@ function resultToRow(result) {
}
async function generateSummary() {
+ const isDebugMode = process.env.DEBUG === 'true' ? 'true' : 'false'
const outputFile = core.getState('outputFile')
const homeDir = core.getState('homeDir')
const boltUser = core.getState('boltUser')
const egressRulesYAML = YAML.stringify(egressRules)
- // Upload auditd log file to artifacts
const artifactClient = new DefaultArtifactClient()
- const artifactName = 'bolt-auditd-log'
- const files = ['/var/log/audit/audit.log']
- const { id, size } = await artifactClient.uploadArtifact(
- artifactName,
- files,
- '/var/log/audit'
- )
- core.info(`Created bolt auditd log artifact with id: ${id} (bytes: ${size}`)
+ if (isDebugMode === 'true') {
+ // Upload auditd log file to artifacts
+ const artifactName = 'bolt-auditd-log'
+ const files = ['/var/log/audit/audit.log']
+
+ const { id, size } = await artifactClient.uploadArtifact(
+ artifactName,
+ files,
+ '/var/log/audit'
+ )
+ core.info(`Created bolt auditd log artifact with id: ${id} (bytes: ${size}`)
+ }
await exec(
`${homeDir}/auparse -format=json -i -out audit.json -in /var/log/audit/audit.log `