Skip to content

ci: Allow flags board workflow to inherit secrets#717

Merged
marandaneto merged 1 commit into
mainfrom
fix-semgrep-secrets-inherit
Jul 1, 2026
Merged

ci: Allow flags board workflow to inherit secrets#717
marandaneto merged 1 commit into
mainfrom
fix-semgrep-secrets-inherit

Conversation

@marandaneto

Copy link
Copy Markdown
Member

💡 Motivation and Context

The feature flags project-board caller sometimes failed CI around Semgrep's broad secrets: inherit finding. Replacing it with explicit secret mapping caused GitHub to reject the reusable workflow at startup because the central .github workflow does not declare workflow_call.secrets.

This keeps the required inheritance for that reusable workflow and documents the Semgrep exception inline.

💚 How did you test it?

  • Parsed .github/workflows/call-flags-project-board.yml with PyYAML and verified secrets resolves to inherit.
  • Ran git diff --check.
  • Ran Semgrep locally with a rule matching secrets: inherit and verified # nosemgrep suppresses the intentional exception.
  • Ran the PostHog .github Semgrep rules locally against the workflow file.

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

If releasing new changes

  • Ran sampo add to generate a changeset file

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Pi investigated the failing workflow behavior, confirmed explicit secret mapping is incompatible with the pinned central reusable workflow, and kept secrets: inherit as the required GitHub Actions configuration while adding a scoped Semgrep suppression with context for reviewers.

@marandaneto marandaneto self-assigned this Jul 1, 2026
@greptile-apps

greptile-apps Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "ci: allow flags board workflow secrets i..." | Re-trigger Greptile

@marandaneto marandaneto marked this pull request as ready for review July 1, 2026 09:23
@marandaneto marandaneto requested a review from a team as a code owner July 1, 2026 09:23
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

posthog-python Compliance Report

Date: 2026-07-01 09:24:07 UTC
Duration: 176180ms

✅ All Tests Passed!

45/45 tests passed


Capture Tests

29/29 tests passed

View Details
Test Status Duration
Format Validation.Event Has Required Fields 517ms
Format Validation.Event Has Uuid 1507ms
Format Validation.Event Has Lib Properties 1507ms
Format Validation.Distinct Id Is String 1506ms
Format Validation.Token Is Present 1507ms
Format Validation.Custom Properties Preserved 1507ms
Format Validation.Event Has Timestamp 1506ms
Retry Behavior.Retries On 503 9519ms
Retry Behavior.Does Not Retry On 400 3504ms
Retry Behavior.Does Not Retry On 401 3509ms
Retry Behavior.Respects Retry After Header 9511ms
Retry Behavior.Implements Backoff 23531ms
Retry Behavior.Retries On 500 7500ms
Retry Behavior.Retries On 502 7516ms
Retry Behavior.Retries On 504 7508ms
Retry Behavior.Max Retries Respected 23522ms
Deduplication.Generates Unique Uuids 1507ms
Deduplication.Preserves Uuid On Retry 7516ms
Deduplication.Preserves Uuid And Timestamp On Retry 14519ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry 7508ms
Deduplication.No Duplicate Events In Batch 1502ms
Deduplication.Different Events Have Different Uuids 1508ms
Compression.Sends Gzip When Enabled 1506ms
Batch Format.Uses Proper Batch Structure 1506ms
Batch Format.Flush With No Events Sends Nothing 1005ms
Batch Format.Multiple Events Batched Together 1504ms
Error Handling.Does Not Retry On 403 3508ms
Error Handling.Does Not Retry On 413 3509ms
Error Handling.Retries On 408 7513ms

Feature_Flags Tests

16/16 tests passed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id 1003ms
Request Payload.Flags Request Uses V2 Query Param 1006ms
Request Payload.Flags Request Hits Flags Path Not Decide 1006ms
Request Payload.Flags Request Omits Authorization Header 1006ms
Request Payload.Token In Flags Body Matches Init 1006ms
Request Payload.Groups Round Trip 1007ms
Request Payload.Groups Default To Empty Object 1006ms
Request Payload.Person Properties Distinct Id Auto Populated When Caller Omits It 1006ms
Request Payload.Disable Geoip False Propagates As Geoip Disable False 1006ms
Request Payload.Disable Geoip Omitted Defaults To False 1006ms
Request Payload.Flag Keys To Evaluate Contains Only Requested Key 1006ms
Request Lifecycle.No Flags Request On Init Alone 503ms
Request Lifecycle.No Flags Request On Normal Capture 1507ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests 1010ms
Request Lifecycle.Mock Response Value Is Returned To Caller 1002ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event 1509ms

@ioannisj ioannisj left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trust that this is safe to do

@marandaneto marandaneto merged commit bce6712 into main Jul 1, 2026
38 checks passed
@marandaneto marandaneto deleted the fix-semgrep-secrets-inherit branch July 1, 2026 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants