Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (

const (
StepSecurityLogCorrelationPrefix = "Step Security Job Correlation ID:"
StepSecurityAnnotationPrefix = "StepSecurity Harden Runner:"
EgressPolicyAudit = "audit"
EgressPolicyBlock = "block"
)
Expand Down Expand Up @@ -109,6 +110,7 @@ func Run(ctx context.Context, configFilePath string, hostDNSServer DNSServer,
ipAddress, err := dnsProxy.getIPByDomain(domainName)
if err != nil {
WriteLog(fmt.Sprintf("Error resolving allowed domain %v", err))
WriteAnnotation(fmt.Sprintf("%s Reverting agent since allowed endpoint %s could not be resolved", StepSecurityAnnotationPrefix, domainName))
RevertChanges(iptables, nflog, cmd, resolvdConfigPath, dockerDaemonConfigPath, dnsConfig)
return err
}
Expand Down