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

Function getAWFImageTag

pkg/workflow/firewall.go:226–237  ·  view source on GitHub ↗

getAWFImageTag returns the AWF Docker image tag to use for the --image-tag flag. This ensures the AWF binary pulls its matching Docker image version instead of latest. Returns the version from firewall config if specified, otherwise returns the default version. The version is returned without the 'v

(firewallConfig *FirewallConfig)

Source from the content-addressed store, hash-verified

224// Returns the version from firewall config if specified, otherwise returns the default version.
225// The version is returned without the 'v' prefix (e.g., "0.7.0" instead of "v0.7.0").
226func getAWFImageTag(firewallConfig *FirewallConfig) string {
227 var version string
228 if firewallConfig != nil && firewallConfig.Version != "" {
229 version = firewallConfig.Version
230 firewallLog.Printf("Using custom AWF image tag: %s", version)
231 } else {
232 version = string(constants.DefaultFirewallVersion)
233 firewallLog.Printf("Using default AWF image tag: %s", version)
234 }
235 // Strip the 'v' prefix if present (AWF expects version without 'v' prefix)
236 return strings.TrimPrefix(version, "v")
237}
238
239// getSSLBumpArgs returns the AWF arguments for SSL Bump configuration.
240// Returns arguments for --ssl-bump and --allow-urls flags if SSL Bump is enabled.

Callers 4

BuildAWFArgsFunction · 0.85
TestGetAWFImageTagFunction · 0.85
collectDockerImagesFunction · 0.85
BuildAWFConfigJSONFunction · 0.85

Calls 1

PrintfMethod · 0.45

Tested by 1

TestGetAWFImageTagFunction · 0.68