Security
CargoWall
What is CargoWall?
CargoWall is CodeCargo's eBPF-based Layer 4 firewall that controls network egress from your GitHub Actions workflow runs. It monitors and enforces network access policies on every outbound connection made during workflow execution, helping prevent data exfiltration and ensuring workflows only communicate with approved destinations.
Plan Availability
CargoWall audit mode is included on all plans. Enforce mode, custom network policies, baselines, and advanced firewall features require a Team or Enterprise plan. See pricing for details.
Key Capabilities
- Enforce Mode: Block unauthorized outbound connections in real time
- Audit Mode: Monitor and log all network activity without blocking — ideal for rollout and assessment
- Policy-Based Rules: Define allowed destinations by hostname, IP address, subnet, or port
- Workflow Visualization: View security overlays on workflow run graphs showing per-job and per-step network activity
- Multi-Level Assignment: Apply policies at the organization, repository, or individual workflow level
Overview Dashboard
The CargoWall hub is accessible from the organization sidebar under CargoWall. The Overview tab provides five switchable dashboard views (Enforcement, Activity, Coverage, Audit Readiness, and Trends), each with summary statistics and trend charts. Use the time range selector to adjust the reporting window.
The Overview opens on Enforcement once any job enforces. While every job only audits, as when the Migration Assistant brings an organization onto CargoWall, it opens on Audit Readiness, which shows what enforcing would deny, rather than an Enforcement view of zeros. A link that names a view always opens that view.
Enforcement
This view focuses on policy enforcement outcomes:
- Denied Connections — connections blocked by enforce-mode policies
- Denial Rate (%) — percentage of total connections that were denied
- Allowed Connections — connections that matched an allow rule
- Runs Impacted — workflow runs where at least one connection was denied
Charts display Connections Over Time (allowed, denied, and would-deny trends) and Denial Rate Over Time. A Top Denied Destinations card shows the most frequently blocked hostnames.
- Auto-Allowed Connections — connections that matched default allowed host rules
Coverage
Shows how broadly CargoWall is deployed across your workflows:
- Enforcement Coverage (%) — workflows running in enforce mode
- Audit Coverage (%) — workflows running in audit mode
- Unprotected Workflows — workflows with no CargoWall policy assigned
- Policy Assignment (%) — repositories with at least one policy
- Active Policies — total active policies in the organization
Activity
A general traffic overview for the selected period:
Total Runs — workflow runs analyzed
Total Connections — outbound network connections observed
Unique Destinations — distinct hostnames contacted
New Destinations — hostnames seen for the first time in this period
Connections per Run — average outbound connections per workflow run
Auto-Allowed Connections — connections permitted by default allowed host rules
Audit Readiness
Helps you evaluate the impact of switching audit-mode policies to enforce:
- Would-Deny Connections — connections that would be blocked if audit switched to enforce
- Would-Deny Rate (%) — percentage of audit connections that would be blocked
- Projected Impact — additional connections blocked if all audit policies moved to enforce
A Would-Block Trend chart shows how the would-deny count is moving, and a High-Risk Audit Workflows table lists workflows ranked by would-deny count so you can prioritize enforce rollout. For a verdict on one scope, see Ready to Enforce.
Trends
Longer-term trend charts for Denial Rate, Enforcement Coverage, New Destinations, and Would-Block counts over time, with a Mean Time in Audit tile (see Mean Time in Audit). Useful for tracking security posture improvements.
Time Range Filtering
The CargoWall dashboard includes time range controls that respect your organization's data retention settings:
- Period Selector: Choose from 30, 60, or 90-day reporting windows
- Retention Limits: Available time ranges are automatically filtered based on your plan's CargoWall log retention period
- Smart Defaults: When retention limits apply, the maximum available period is highlighted as the default selection
The time range selector appears throughout CargoWall views including the overview dashboard, activity pages, and run analysis screens.
Data Retention
Time range options are limited by your organization's CargoWall log retention period. Higher-tier plans include longer retention periods for historical analysis.
Runs
The Runs tab lists all workflow runs that CargoWall has analyzed. You can filter by repository, workflow name, actor (GitHub user), and time range, and sort by any column.
When a time range or filters leave the list empty, it says which one matched no run and how to widen it: choose a longer time range, or clear a filter. Before any workflow has reported, the list reads No CargoWall activity yet. Someone who can install CargoWall gets Add to workflows there, which opens the Add CargoWall Action dialog. Anyone else is told to ask an organization admin to add CargoWall to their workflows.
Run Detail
Click a run to open the detail view, which has two tabs:
Visualizer Tab
A React Flow–based graph renders the workflow structure with a security overlay:
- API-Driven Expansion: Matrix jobs are expanded using actual run data from the GitHub API, showing the exact job variants that executed
- Security Indicators: Each job and step node displays network activity badges and policy enforcement status
- Security Panel: Click any job or step to open a side panel showing its network events, unique destinations, and allow/deny breakdown
Jobs Tab
- Left sidebar: lists each job in the run with a status icon
- Main panel: shows the selected job's network events
For each job you see summary stats — Destinations, Allowed, Denied (or Would Deny in audit mode), and Total connections. An events table lists every outbound connection with columns for Step (with the process that made the connection), Destination, Port, Status, and Timestamp. Use the search box, the All / Denied toggle (Would Deny in audit mode), or Include auto-allowed to focus the list. If you can change a policy for this run, denied and would-deny rows have an Allow button that adds the destination to a policy without leaving the run.
If you can change this workflow's and job's default policies, a Manage policy link appears next to the selected job's name. Clicking it takes you directly to the policy manager scoped to that job, so you can review or update rules without leaving the run context. See Who Can Change Policies.
When a connection reaches its destination through a CNAME of an allowed host, the events table shows an expandable detail row for that entry. Click the row to reveal the full CNAME resolution path displayed as origin › … › target, with each hop rendered as a hostname. Only connections that involved an indirect CNAME resolution show this expansion — direct connections have no expandable detail.
Summary Rail
The Summary rail on the right shows run metadata including duration, actor (with GitHub avatar), and start time. A Source block at the top of the rail provides GitHub deep links:
- Run # — links directly to the GitHub Actions run
- Branch / ref — links to the branch or tag on GitHub
- Commit SHA — links to the specific commit
Page Header Actions
If you can change this workflow's default policies, an Open in Policy Manager button appears in the page header. Clicking it opens the policy manager pre-scoped to the workflow associated with this run, where you can create or update allow rules based on what you observed.
Public Run Pages
CargoWall supports viewing workflow runs from public GitHub repositories that don't have a linked CodeCargo organization. These public run pages are accessible at:
/cargowall/github/{orgAlias}/{repoName}/actions/runs/{runId}
Public run pages provide the same detailed analysis as organization runs, including:
- Job-level network event analysis
- Workflow visualization with security overlays
- Connection status and policy evaluation results
- Step-by-step network activity breakdown
Public repositories are allowed to report CargoWall data when their repository_visibility is set to "public", even without a linked organization. This enables open-source projects and public repositories to benefit from CargoWall's network security analysis. Run data is stored for 7 days for organizations that don't have a linked CodeCargo organization.
Public Repository Access
Public run pages are only available for repositories with public visibility. Private repositories require a linked CodeCargo organization to view CargoWall analysis.
IP-Only Destinations
CargoWall automatically handles network connections that don't resolve to hostnames. When workflows connect directly to IP addresses (such as internal services or infrastructure endpoints), these appear in the destinations list using the IP address as the identifier.
IP-only destinations are treated the same as hostname destinations in all CargoWall features:
- Policy matching: IP addresses can be matched against CIDR rules in your policies
- Filtering and search: You can search for specific IP addresses in the destination views
- Run analysis: IP connections appear in job and step network events alongside hostname connections
- Visualization: IP addresses display in the workflow visualizer security overlay
IP Address Display
When a connection has no hostname, CargoWall displays the raw IP address (e.g., 192.168.1.100) in all destination lists and network event tables. This helps you identify direct IP connections that may need policy coverage.
Destinations
The Destinations tab provides a comprehensive view of all network destinations contacted by your workflows. This view helps you understand your organization's network traffic patterns and manage policy coverage.
Destination Overview
The destinations table shows:
| Column | Description |
|---|---|
| Destination | Hostname or IP address contacted by workflows |
| Connections | Breakdown of allowed (green), denied (red), and would-deny (yellow) connections |
| Applied Policies | Policy badges showing which policies match this destination. A default policy is named by its level, such as Workflow default policy |
| Tags | Tag badges from matching tag rules |
| Last Seen | When this destination was last contacted |
Filtering Destinations
Use the filter controls to focus on specific destinations:
- Action Filter: Show all destinations, or filter by "Would Deny", "Denied", or "Allowed" status
- Hostname Search: Search for specific hostnames or IP addresses
- Time Range: Filter destinations by when they were first or last seen
Auto-Allowed Filter
Use the Auto-Allowed Filter to control visibility of connections that were automatically allowed by default host filtering:
- All: Show all destinations regardless of auto-allowed status
- Only: Show only destinations that were auto-allowed
- Exclude: Hide destinations that were auto-allowed
Auto-allowed connections are those that matched default allowed hosts configured in your CargoWall policies, helping you distinguish between explicitly allowed destinations and those permitted by default rules.
Adding Destinations to Policies
For destinations that need policy coverage, an organization admin can quickly add them to existing policies or create new ones. Add to Policy isn't shown to anyone else.
- Open the actions menu (⋯) on any destination and choose Add to Policy
- In the Allow Destination dialog, choose where to add it under Add to: an existing policy or a new policy. From a run, Allow opens the same dialog, which also offers the default policies of the run's job, workflow, repository, and organization that you can change
- Optionally specify port restrictions for the rule
- Click Add Rule (or Create Policy); the destination is added as an allow rule
IP Address Handling
Destinations that are IP addresses (rather than hostnames) are automatically handled with CIDR notation when added to policies. IPv4 addresses are converted to /32 CIDR blocks for precise matching.
Auto-Allowed Events
The Add to Policy button only appears for workflow runs that contain events requiring explicit policy rules. Runs with only auto-allowed connections (those permitted by default host filtering) do not show this button since no additional policy configuration is needed.
Editing Destination Hostnames
When adding a destination to a policy, you can modify the hostname before creating the rule. This is useful when you want to create a more general rule or correct the destination value:
- In the Add to Policy dialog, click the pencil icon next to the destination hostname
- Edit the hostname in the input field that appears
- Press Enter to confirm your changes or Escape to cancel
- The policy rule will be created using your modified hostname instead of the original
This feature allows you to:
- Generalize specific hostnames (e.g., change
api-v2.example.comto*.example.com) - Correct misidentified hostnames
- Create broader rules that cover multiple related destinations
Rule Validation
The modified hostname is validated when creating the policy rule. IP addresses are automatically converted to CIDR notation (/32 for IPv4) when added to policies.
Destination Detail
Click on any destination to view detailed information including:
- Connection history and patterns
- Which workflows and jobs contacted this destination
- Current policy coverage status
- Recommended policy actions
Tag Rules
CargoWall tag rules help you organize and filter network destinations by creating labeled groups based on hostname patterns or IP address ranges. Tag rules enable you to quickly identify related destinations and apply bulk policy operations.
Creating Tag Rules
- Open CargoWall → Manager and select your organization at the top of the Entities tree
- Scroll to Destination Tags and click Add Tag Rule
- Configure the rule:
- Label — text shown on the tag
- Color — visual identifier for the tag badge
- Type — choose Hostname or CIDR Block
- Value — hostname pattern with wildcards or CIDR block
- Description — optional, shown on hover
Tags are informational: they label destinations on the Destinations and run views but do not allow or deny traffic.
Rule Types
| Rule Type | Description | Example |
|---|---|---|
| Hostname | Match destinations by hostname patterns | *.github.com, api.*.example.com |
| CIDR | Match destinations by IP address ranges | 10.0.0.0/8, 192.168.1.0/24 |
Hostname Patterns
Hostname rules support wildcard matching:
*matches exactly one DNS label**matches one or more DNS labels- Plain patterns (no wildcards) match the exact hostname only
- Matching is case-insensitive
Examples:
*.internal.example.commatchesapi.internal.example.combut notapi.dev.internal.example.com**.internal.example.commatches bothapi.internal.example.comandapi.dev.internal.example.comgithub.commatches onlygithub.com, notapi.github.com
Using Tags for Filtering
Once tag rules are configured, destinations automatically receive tag badges based on matching rules. You can:
- Filter by tag — use the Tag filter on the Destinations tab, or click a tag badge, to show only destinations matching that tag rule
- Bulk policy operations — select tagged destinations for policy assignment
- Visual organization — quickly identify destination types using color-coded tags
Tag filtering uses optimized database queries that push rule matching into SQL for fast performance even with large destination sets.
Tag Inheritance
Destinations can match multiple tag rules and will display all applicable tags. IP-only destinations match CIDR rules, while hostname destinations can match both hostname and CIDR rules (when they resolve to IPs in the specified ranges).
Repository and Workflow CargoWall Views
CargoWall provides dedicated views for individual repositories and workflows, accessible from their respective detail pages. These focused views offer the same CargoWall functionality but scoped to a specific context.
Repository CargoWall
Access repository-specific CargoWall data by navigating to a repository and clicking the CargoWall tab. This view includes:
- Runs — workflow runs from this repository only
- Baselines — network baselines specific to this repository
- Policy Manager — a button that opens the Policy Manager scoped to this repository, where you assign policies and set its mode
Switch between Runs and Baselines with the toggle in the card header; the repository context automatically filters all data.
Workflow CargoWall
Access workflow-specific CargoWall data by opening a workflow and clicking its CargoWall tab. This view includes:
- Runs — executions of this specific workflow only
- Baselines — network baselines for this workflow's execution patterns, with a Create Baseline button
- Policy Manager — opens the Policy Manager scoped to this workflow and its jobs
The workflow view provides the most granular CargoWall analysis, showing exactly how network policies affect a single workflow's behavior.
Consistent Interface
Repository and workflow CargoWall views use the same tabbed interface as the organization-level CargoWall dashboard, ensuring a consistent experience across all levels of analysis.
Project CargoWall
Access project-specific CargoWall data by switching to a project and choosing CargoWall in the sidebar. It has the same tabs as the organization view, scoped to the project's repositories:
- Overview — the dashboard views for the project
- Runs — workflow runs from repositories within this project only
- Destinations — destinations contacted by project workflows
- Baselines — network baselines specific to project workflows
- Manager — the Policy Manager, with the repository tree limited to this project
The project CargoWall view provides a focused analysis of network security across all repositories and workflows within the project scope, making it easier to manage policies for related services and applications.
Project Scope Filtering
Project CargoWall views automatically filter all data to show only workflows and runs from repositories that belong to the project, providing a clean separation between different project contexts.
Policies
Policies define which network destinations are allowed during workflow execution. Any connection that does not match a rule is denied by default. Policies are managed in the Manager tab (the CargoWall Policy Manager), whose left panel has two tabs: Entities (your organization, repositories, workflows, and jobs) and Policies.
Creating a Policy
- In the Manager, open the Policies tab and click +
- Enter a policy name
- Add rules to the policy with Add Rule
Only an organization admin can create a policy. Anyone else sees Ask an organization admin to create a CargoWall policy. in its place.
Who Can Change Policies
| Policy | Who can change it |
|---|---|
| Named policies, and the organization's default policy | Organization admins |
| A repository's default policy, and those of its workflows and its jobs | Organization admins, and anyone with write access to that repository |
CargoWall offers Allow, Add to Policy, Manage policy, and Open in Policy Manager only for policies you can change. The add-rule dialogs list only those policies as targets, and say why when there are none.
In the Policy Manager, including on Assignments, a policy you can't change shows its rules without the controls to edit them. Rename and Delete are left out of the policy list. Add Rule (or Add Rules on a default policy with no rules yet) stays, turned off, and says who can change the policy: Ask an organization admin to change this policy. for a named policy or the organization's default policy, or that you need write access to the repository for a repository's, workflow's, or job's default policy.
Policy Rules
Each rule specifies an allowed destination using one of these types:
| Rule Type | Description | Example |
|---|---|---|
| Hostname | Domain match (subdomains automatically included) | github.com (also allows *.github.com) |
| IP | Specific IP address | 192.168.1.100 |
| Subnet | CIDR range | 10.0.0.0/8 |
| Port | Optional port restriction per rule | 443, 8080 |
Rules define allow actions. The implicit default is deny all — connections that don't match any rule are blocked (in enforce mode) or flagged (in audit mode).
Hostname Matching in Policies vs. Tag Rules
Policy hostname rules treat a bare hostname like github.com as also matching its subdomains (equivalent to *.github.com). Tag rules behave differently: a plain pattern matches the exact hostname only, and you must add a wildcard (such as *.github.com) to match subdomains.
Hostname rules accept underscores in labels. You can use _gateway to allow the runner's default gateway by name — the name systemd-resolved gives it — instead of a provider CIDR.
Port Protocol Specification
When adding port restrictions to rules, you can specify the protocol for more granular control:
| Protocol | Description | Example Use Case |
|---|---|---|
| All | Both TCP and UDP traffic (default) | General web services |
| TCP | TCP traffic only | HTTP/HTTPS, database connections |
| UDP | UDP traffic only | DNS queries, streaming protocols |
| ICMP | ICMP traffic only | Network diagnostics, ping tests |
This allows you to create more precise rules, such as allowing DNS queries on port 53 UDP while blocking TCP connections to the same port.
ICMP Port Restrictions
ICMP rules must use port 0 since ICMP is a network layer protocol that doesn't use traditional port numbers. Non-zero ports are invalid for ICMP rules.
Policy Groups
You can group multiple policies together into a Policy Group for easier bulk assignment. Create a group, then add one or more policies to it. Policy groups can be assigned to repositories or workflows just like individual policies.
Default Policies
CargoWall supports default policies that are automatically created and managed for each entity in your hierarchy. Default policies provide baseline network rules without requiring manual policy creation.
Creating Default Policies
- Open CargoWall → Manager
- Select the entity (organization, repository, workflow, or workflow job) in the Entities tree
- Under Default Policy, click Add Rules
- The default policy is created for that entity the first time you add a rule
Default policies are automatically linked to their owning entity and inherit through the hierarchy.
Policy Inheritance Chain
CargoWall policies follow a hierarchical inheritance model:
- Organization Level — base policies that apply to all repositories and workflows
- Repository Level — overrides organization settings for specific repositories
- Workflow Level — overrides repository settings for individual workflows
- Workflow Job Level — most specific level, overrides all parent settings
Each level can have both a default policy (automatically managed) and assigned policies (manually configured). Child entities inherit settings from their parents unless explicitly overridden.
Viewing Policy Chains
The Policy Manager shows the complete inheritance hierarchy for any entity:
- Open CargoWall → Manager and select a workflow or job in the Entities tree
- The Chain view (the default) shows the selected level expanded, with its mode, baselines, default policy rules, and assigned policies, and each inherited level (repository, organization) collapsed below it
- Expand a level to see which policies are active there and where its mode is inherited or overridden
- Switch to Effective to see the merged rules and mode the next run will get
This helps you understand exactly which policies will be applied during workflow execution.
Baselines
CargoWall baselines automatically learn and manage expected network traffic patterns for your workflows. Instead of manually creating policies for every destination, baselines observe your workflow behavior and establish approved connection patterns that can be enforced or used as templates for new policies.
How Baselines Work
Baselines operate in three phases:
- Learning Phase - Baselines start in learning mode, observing network connections from workflow runs and building a profile of expected destinations
- Stable Phase - After collecting sufficient data (configurable run count), baselines transition to stable status with a complete traffic profile
- Enforcement - Stable baselines can be converted to enforcement policies or used as templates for manual policy creation
This walkthrough takes one workflow through the whole rollout: reading what audit mode would have denied, allowing a legitimate destination, converting the learned baseline to a policy, switching to enforce, and checking the effective policy.
Baseline Types
CargoWall creates baselines at three levels of granularity:
| Type | Scope | Description |
|---|---|---|
| Repository | All workflows in a repository | Learns traffic patterns across all workflows in the repository |
| Workflow | Single workflow file | Learns patterns specific to one workflow across all its jobs |
| Workflow Job | Individual job within a workflow | Learns patterns for a specific job within a workflow |
Automatic Baseline Creation
CargoWall automatically creates learning baselines when workflows run:
- Repository baselines are created when any workflow in the repository executes
- Workflow baselines are created when a specific workflow runs
- Job baselines are created for individual jobs within workflows
- All baselines start in learning mode with a default target of observing multiple runs
- Baselines automatically transition to stable when they have adequate coverage
Plan Availability
Baselines require a Team or Enterprise plan. See pricing for details.
Managing Baselines
Access baseline management from the Baselines tab in the CargoWall section:
- View all baselines across your organization with status indicators
- See scope and status (Repository, Workflow, or Workflow Job; Learning or Stable) and learning progress for each baseline
- Expand a baseline to see its learned entries: each destination and endpoint with connection and run counts
- Convert baselines to policies when you're ready to enforce the learned patterns
- Recompute baselines to refresh the learned traffic patterns with recent data
- Manual baseline creation from historical workflow run data, with Create Baseline on a workflow's CargoWall tab
Only an organization admin can create a baseline. When a workflow, repository, or job has none, its baseline section reads No baselines yet and tells anyone else to ask an organization admin to create one.
Baseline Status
| Status | Description |
|---|---|
| Learning | Actively observing workflow runs and building traffic patterns |
| Stable | Has observed sufficient runs and established a complete traffic profile |
Managing Baseline Actions
Baselines include management actions accessible through dropdown menus on each baseline entry. Available actions depend on your permissions and the baseline's current status:
| Action | Description | Requirements |
|---|---|---|
| Rename | Change the baseline name | Update permissions |
| Recompute | Recalculate baseline using recent runs | Recompute permissions |
| Convert to Policy | Create enforcement policy from stable baseline | Convert permissions, stable status |
| Delete | Remove the baseline permanently | Delete permissions |
Actions are contextually shown based on baseline status and your role permissions. For example, the "Convert to Policy" option only appears for baselines in stable status.
Baseline Recompute
You can recompute baselines to refresh their learned traffic patterns using recent workflow run data:
- Click the Recompute action from a baseline's dropdown menu
- Specify the number of recent runs to analyze
- Review the recompute settings and confirm
- The baseline updates with new traffic patterns based on the selected runs
Recomputing is useful when workflow network requirements change or when you want to incorporate recent traffic patterns into an existing baseline.
Converting to Policies
Stable baselines can be converted into enforcement policies:
- Open the actions menu (⋯) on a stable baseline and choose Convert to Policy
- Enter a Policy Name (it defaults to the baseline name followed by "Policy") and click Submit; each unique destination in the baseline becomes an allow rule
- Review or edit the new policy in the Policy Manager's Policies tab
- Assign the new policy to repositories or workflows
This workflow allows you to move from observation to enforcement with confidence that your policies reflect actual workflow needs.
Learning Period
Baselines require multiple workflow runs to establish reliable patterns. The learning period ensures policies are based on comprehensive traffic analysis rather than single-run observations.
Key Terminology
| Term | Meaning |
|---|---|
| Enforce | Denied connections are blocked in real time |
| Audit | Denied connections are logged but not blocked (test/assessment mode) |
| Would Deny | Connections flagged in audit mode that would be blocked under enforce |
| Coverage | Percentage of workflows with a CargoWall policy assigned |
| Denial Rate | Percentage of all observed connections that were denied |
| Policy | A set of allow rules; unmatched traffic is denied by default |
| Policy Group | A collection of policies for bulk assignment |
Using CargoWall in Your Workflows
To integrate CargoWall into your GitHub Actions workflows, add the CargoWall action:
- uses: code-cargo/cargowall-action@v1
with:
mode: enforce
api-url: https://app.codecargo.com
Configuration options:
- mode:
enforceto block unauthorized connections, orauditto monitor without blocking - api-url: CodeCargo API endpoint for policy management
- allowed-hosts (optional): permitted hostnames, one per line, for an inline policy — only needed if you are not using a SaaS-managed policy
Pin the Action
The CargoWall GitHub Action is maintained in the code-cargo/cargowall-action repository. The v1 tag can be moved to other code. To pin the step, use a release's commit SHA in place of v1, with the tag kept as a comment (code-cargo/cargowall-action@<sha> # v1.4.0). The pull requests CodeCargo opens to install CargoWall pin it this way by default.
Organization Linking Requirement
CargoWall requires your repository to be linked to a CodeCargo organization to receive SaaS-managed policies. If your repository is not linked to an organization:
- The CargoWall action will return a 404 error when attempting to fetch policies
- The action will fall back to using local configuration (action inputs or environment variables)
- You can still use CargoWall with inline policies by specifying
allowed-hostsin your workflow
Repository Linking
To use SaaS-managed CargoWall policies, ensure your repository is connected to a CodeCargo organization through the GitHub App installation.
CargoWall Checks
CargoWall can automatically create GitHub PR checks that report on network policy violations during workflow execution. When enabled, CargoWall analyzes workflow runs and creates check runs that:
- Show ❌ (failure) status when denied connections are detected
- Show ✅ (success) status when no policy violations occur
- Link back to the CargoWall run details page for full analysis
- Appear directly on pull requests alongside other status checks
This integration provides immediate feedback to developers about network policy compliance without requiring them to navigate to the CargoWall interface.
Enabling CargoWall Checks
CargoWall checks can be configured at the organization and repository levels:
- Organization setting: Controls the default check behavior for all repositories
- Repository override: Allows individual repositories to override the organization default
- Options: Enabled, Disabled, or Inherit (from parent level)
When enabled, checks are automatically created for workflow runs that include CargoWall analysis, providing seamless integration with your existing PR review process.
Check Details
CargoWall checks include a details URL that links directly to the workflow run's CargoWall analysis page, making it easy to investigate policy violations and understand network activity patterns.
Workflow Run URLs
When the CargoWall action completes, it returns a workflow run URL that links directly to the appropriate CargoWall interface:
- Private repositories: Links to the organization's CargoWall activity page for the specific run
- Public repositories: Links to the public CargoWall view for GitHub repository runs
This URL can be used in subsequent workflow steps or displayed in job summaries to provide quick access to CargoWall analysis and network activity details.
Run URL Access
The workflow run URL respects repository visibility settings and provides the most appropriate CargoWall interface for viewing network analysis results.
Installing CargoWall Action
CodeCargo can automatically install the CargoWall action in your workflows that don't currently have network protection. This feature helps you quickly add CargoWall to existing workflows without manual editing.
Automatic Installation
- Open CargoWall in your organization
- On Overview, click Add to workflows to open the Add CargoWall Action dialog. It lists the workflows without CargoWall, all selected
- Under Target version, pick a release, or choose Enter version manually to type a tag, branch, or commit SHA
- Leave Pin to a commit SHA ticked, as it starts, or clear it to reference the tag itself
- Clear any workflows you don't want to change
- Click Create N Pull Requests. CodeCargo opens one pull request per repository
Once a pull request merges, CargoWall starts monitoring that workflow's outbound connections on its next run.
Only an organization admin can add CargoWall this way. Everyone else still sees Add to workflows, turned off, with Ask an organization admin to add CargoWall to your workflows. on hover or focus. A project's CargoWall Overview has the same button, for the project's repositories. Before any workflow has reported, the Overview shows Get Started with CargoWall steps instead of the dashboard, with the CargoWall step to paste. An organization admin also gets Add automatically there, which opens the same dialog.
Workflow Detection
The dialog lists workflows on the default branch of your active repositories that don't already reference code-cargo/cargowall-action and have at least one job with steps. Copies the Migration Assistant archived, or is transferring out of the organization, aren't listed or counted, since no pull request can open there.
From the organization, an organization admin is offered every active repository's workflows. In a project, the dialog lists only the project's repositories you can read on GitHub, even for an organization admin. Over the API or MCP, anyone else is offered only workflows in repositories they can read on GitHub.
Pinning the Version
With Pin to a commit SHA ticked, each workflow references the commit the version points to now, with the version kept as a comment. A moving tag such as v1 is commented with the release at that commit (# v1.4.0) when there is one.
CodeCargo resolves the version when you click Create N Pull Requests, so a version it can't pin is refused while you wait, naming the version, rather than failing in every repository's pull request later.
A version that names a commit, such as a full or abbreviated SHA or a pull request's ref, has nothing to pin, so the dialog offers no pin choice for it. CodeCargo accepts it only if the commit is in code-cargo/cargowall-action's own history: reachable from its default branch, or the commit of one of its tags. A commit that exists only in a fork is refused.
The release you install, or move the action to with Update action, becomes your organization's CargoWall release. An install that names no version, and the CargoWall step a Migration Assistant conversion adds, pin that release. Until there is one, they pin the latest release.
What the Pull Request Changes
Each pull request adds a step named CargoWall as the first step of every job that runs its own steps, and gives the job the permissions CargoWall needs: contents: read, actions: read, and id-token: write. It never takes away a permission the job had:
- A job with its own
permissions:block gets those three added or raised there. - A job without one starts from the workflow's
permissions:, with the three added or raised. A workflow-levelread-allis spelled out with every scope it grants, plusid-token: write. When the workflow's permissions already grant all three, or it setswrite-all, the job gets no block of its own. - When neither the job nor the workflow sets permissions, the job keeps the repository's default token permissions, plus
id-token: write.
A reusable workflow that runs only when another workflow calls it (on: workflow_call alone) runs on its caller's token. In it, a job that sets no permissions, under a workflow that sets none, gets the CargoWall step and no permissions: block, so it keeps every scope its caller passes down. The pull request then names the jobs among the changed workflows that call it, which need actions: read and id-token: write, or says what any caller needs when it finds none. A reusable workflow that also runs on its own triggers is changed like any other.
Jobs that call a reusable workflow, have no steps, or already run CargoWall are skipped. Jobs whose steps are an inline list (steps: [...]), and jobs whose repository default token permissions CodeCargo couldn't confirm, are left without CargoWall and listed under Left alone in the pull request, with what to add by hand.
Migration Assistant Conversions
A Migration Assistant conversion adds the CargoWall step to each converted workflow in audit mode only, pinned to your organization's CargoWall release. Moving those workflows to enforce is a later step you take in CargoWall. See Ready to Enforce.
Ready to Enforce
CodeCargo has one answer to whether a scope (the organization, a repository, a workflow, or a job) is ready to move from audit to enforce. An AI assistant connected through an MCP credential reads it with cargowall_check_enforcement_readiness. cargowall_set_enforcement_mode refuses to switch a scope to enforce unless that same verdict says it is ready, and gives the same reasons. Changing a mode over MCP needs a credential with write access to CargoWall.
A scope is ready to enforce when all four hold:
- It runs the CargoWall action. Without the action in the workflow, enforcing changes nothing.
- Its jobs ran only where CargoWall can run in the last 30 days. None ran on macOS or Windows, none ran on a runner whose operating system CodeCargo hasn't recorded, and there is job history to judge from. See Runner Labels.
- Its traffic is covered. CargoWall is on, and the effective policy allows every destination the scope connects to. For a repository, workflow, or job, that means every destination in a stable baseline for exactly that entity, so the check needs one. For the organization, it's the organization's traffic over the days the check reads, 30 by default.
- It has been quiet for 14 days. CargoWall watched it for the whole window, it ran in the window, and nothing it did would have been blocked. A workflow counts as watched for the whole window when it ran in the window and also in the 7 days before it, so one run months ago never stands in for the last two weeks.
Each reason a scope falls short is given in plain words, with what to do about it. The check is read-only and judges the repositories you can open. Switching the whole organization to enforce judges every repository the change would move, so someone who can't open them all is refused.
Only uncovered destinations can be accepted: with acknowledge_uncovered, the switch goes ahead knowing connections to them will be blocked. Nothing else readiness finds can be overridden.
What Counts Toward a Scope
- At repository and organization scope, every inheriting workflow that runs CargoWall is judged on its own, so one that falls short holds the scope back and is named.
- A workflow that doesn't run, because it's off the default branch or run only by hand, still holds the scope back. Let it run in audit, or give it a mode of its own (pin it to audit), so the rest of the scope can enforce.
- A workflow or job with its own mode below the scope is left out of the runner and quiet-window checks, and so are skipped jobs.
- A pinned job's runs are found by the name its file gives it: its
name:, or its key when it has none, including each matrix leg of that name. A job whose name has${{ }}in it is named only when it runs, so its runs still count. Pin the workflow, not the job.
Runner Labels
CodeCargo reads a runner's operating system from the first label that starts with linux, ubuntu, windows, or macos. Without one, beside self-hosted it reads a label naming a Linux distribution as Linux: rhel, centos, rocky, rockylinux, alma, almalinux, fedora, debian, amazonlinux, ec2-linux, oraclelinux, sles, suse, opensuse or alpine, with or without a version; al or ol, with a version; arch or archlinux, as the whole label.
A version follows the name directly (rhel9, alpine3.19, al2023, ol8) or after a - or _ (rhel-9, al-2023, ol_8). Any name but arch and archlinux may end in a - or _ and more (rhel9-x64, centos-stream-9, al2023-arm64). No distribution is read when any label mentions macOS or Windows.
So [self-hosted, rhel9] reads as Linux, while my-linux, al-arm64, arch-x64 (a CPU label), and a bare rhel9 without self-hosted aren't read. When a runner's operating system isn't recorded, name it in runs-on, such as [gpu-box, linux] for a self-hosted runner, or give a larger runner a name that starts with it, then run the workflow once.
Mode Change Tracking
CargoWall automatically tracks when enforcement modes change across your organization hierarchy. This tracking provides visibility into policy evolution and supports audit reporting.
Change Attribution
When organization admins modify CargoWall modes (switching between Audit and Enforce), the system records:
- Who made the change — the organization user who updated the mode
- When it occurred — timestamp of the mode change
- What changed — old mode and new mode values
- Cascade effects — automatic mode changes to inheriting child entities
Audit Timeline
Mode changes create an audit trail that helps you understand:
- How long entities spent in audit mode before enforcement
- Which users are making policy changes
- The progression from audit to enforce across your organization
Inheritance Tracking
When you change a mode at the organization or repository level, CargoWall automatically logs cascading changes to all inheriting child entities (those with "Unspecified" mode). This provides complete visibility into policy propagation.
Mean Time in Audit
The Trends view of the Overview dashboard includes a "Mean Time in Audit" metric that calculates the average time entities spend in audit mode before transitioning to enforce. This metric:
- Helps you understand rollout velocity
- Identifies entities that may need additional audit time
- Supports compliance reporting on policy maturation
The calculation uses mode change events to track audit periods and provides organization-wide averages for planning future policy rollouts.
CargoWall Repository
CargoWall is maintained as a separate open-source project at github.com/code-cargo/cargowall. The CargoWall components are distributed as:
- Go modules for integration with other Go applications
- Container images for deployment in Kubernetes environments
- GitHub Action for workflow integration
This separation allows CargoWall to be used independently of the CodeCargo platform while maintaining tight integration when used together.
Independent Usage
While CargoWall integrates seamlessly with CodeCargo for policy management and visualization, it can also be used as a standalone eBPF firewall solution in other environments.
Public CargoWall Interface
For public repositories, CargoWall provides a public interface that allows anyone to view workflow run network analysis without requiring authentication. This public view includes:
- Complete workflow run details and network events
- Job-by-job breakdown of network connections
- Policy enforcement status and connection outcomes
- Workflow visualizer with security overlay
The public interface respects repository visibility settings — only runs from public repositories are accessible through the public CargoWall view. Private repository runs require authentication and organization membership.
Public Access
Public CargoWall runs are accessible to anyone with the direct URL, making it easy to share network analysis results for open source projects and public workflows.
Sudo Lockdown
Policies can include sudo lockdown configuration to restrict privileged command execution within workflows:
- Enabled: When enabled, workflows can only execute sudo commands that are explicitly allowed
- Allow Commands: Specify full paths to commands that are permitted (e.g.,
/usr/bin/apt-get,/bin/systemctl)
Sudo lockdown settings are inherited and merged across the policy hierarchy — if any level enables sudo lockdown, it remains enabled, and allow commands accumulate from all levels.
Command Paths
Allow commands must specify full paths to executables. Relative paths or command names without paths are not permitted for security reasons.
Policy Assignments
Policy assignments control where and how policies are applied across your organization. CargoWall uses a simplified assignment model where multiple policies can be assigned to any entity.
Assignment Levels
Policies can be assigned at four levels:
Organization Level
Set default policies for your entire organization. All repositories and workflows inherit these assignments unless overridden at a lower level.
Repository Level
Assign policies to specific repositories. Repository assignments override organization defaults and apply to all workflows in the repository.
Workflow Level
Assign policies to individual workflows within a repository. Workflow assignments override both organization and repository settings.
Workflow Job Level
Assign policies to specific jobs within a workflow. Job-level assignments provide the most granular control and override all parent assignments.
Multiple Policy Assignment
You can assign multiple policies to the same entity:
- Additive Rules — rules from all assigned policies are combined
- Default Actions — the most restrictive default action takes precedence
- Policy Precedence — explicitly assigned policies take precedence over default policies
Managing Assignments
Assign policies through the entity-specific CargoWall pages:
- Open CargoWall → Manager, or click Policy Manager on a repository's or workflow's CargoWall tab
- Select the organization, repository, workflow, or job in the Entities tree
- Under Assigned Policies, select one or more policies
- Set the CargoWall Mode (Inherit, Enforce, or Audit)
Assignments show the complete policy chain and inheritance relationships for easy troubleshooting.
