Skip to content

Fix stale doc refs and add GITLAB_TOKEN log masking (PR #813 follow-up) #854

Description

@ggallen

Context

PR #813 (multi-forge code agent) was merged before two review findings could be addressed. Both were flagged by the review bot on the final commit.

Findings

1. [stale-reference] Docs reference non-existent policies/github/code.yaml

docs/code.md line 183 and docs/network-policy.md lines 43 and 100 link to policies/github/code.yaml, which does not exist. The GitHub forge inherits the top-level policy: policies/base.yaml (with providers and profiles for network access). Only GitLab has a forge-specific policy file (policies/gitlab/code.yaml).

Fix: Update the three references to point to policies/base.yaml for GitHub.

2. [gha-log-masking-gap] GITLAB_TOKEN not masked in post-code script

scripts/post-code.src.sh masks PUSH_TOKEN via ::add-mask:: (line 307) but does not mask GITLAB_TOKEN. Between script start and the export GITLAB_TOKEN="${PUSH_TOKEN}" assignment at step 6, the original GITLAB_TOKEN value is used for API calls and could appear in error output without log masking.

Fix: Add ::add-mask::${GITLAB_TOKEN} next to the existing PUSH_TOKEN masking:

echo "::add-mask::${PUSH_TOKEN}"
if [ -n "${GITLAB_TOKEN:-}" ]; then
  echo "::add-mask::${GITLAB_TOKEN}"
fi

Files to change

  • docs/code.md — line 183
  • docs/network-policy.md — lines 43 and 100
  • scripts/post-code.src.sh — after line 307
  • scripts/post-code.sh — (rebuilt from src)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions