buildCleanFirewallDirsStep creates a step that removes stale firewall files from the directories populated by the agent artifact download. When the agent artifact is extracted to /tmp/gh-aw/, it pre-populates the sandbox/firewall/logs and sandbox/firewall/audit directories with files from the agent
()
| 160 | // squid container in the detection job, squid fails to initialise (exit code 1). |
| 161 | // Cleaning these directories before pulling containers avoids the crash. |
| 162 | func (c *Compiler) buildCleanFirewallDirsStep() []string { |
| 163 | return []string{ |
| 164 | " - name: Clean stale firewall files from agent artifact\n", |
| 165 | " run: |\n", |
| 166 | fmt.Sprintf(" rm -rf %s\n", constants.AWFProxyLogsDir), |
| 167 | fmt.Sprintf(" rm -rf %s\n", constants.AWFAuditDir), |
| 168 | } |
| 169 | } |
| 170 | |
| 171 | // buildPrepareDetectionFilesStep creates a step that copies agent output files |
| 172 | // to the /tmp/gh-aw/threat-detection/ directory expected by the detection JS scripts. |
no outgoing calls
no test coverage detected