MCPcopy Create free account
hub / github.com/github/gh-aw / buildCleanFirewallDirsStep

Method buildCleanFirewallDirsStep

pkg/workflow/threat_detection_steps.go:162–169  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

160// squid container in the detection job, squid fails to initialise (exit code 1).
161// Cleaning these directories before pulling containers avoids the crash.
162func (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.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected