Skip to content

feat: add PR-scoped TA Validator exceptions - #539

Open
mkolasinski-splunk wants to merge 39 commits into
mainfrom
codex/pr-scoped-gssa-xfail-workflow
Open

mkolasinski-splunk wants to merge 39 commits into
mainfrom
codex/pr-scoped-gssa-xfail-workflow

Conversation

@mkolasinski-splunk

@mkolasinski-splunk mkolasinski-splunk commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Implements the reusable-workflow side of PR-scoped TA Validator exceptions.

Permanent and temporary exceptions use the same canonical YAML schema. The workflow extracts only the marked YAML from the automation-managed PR comment; the TA Validator image validates and merges it with the repository's .ta-validator-exceptions.yaml. Evaluation then consumes the single effective file through the normal TA Validator path.

Interface

  • The shared action exposes only image, mode, and AWS authentication inputs.
  • merge reads $RUNNER_TEMP/ta-validator-comment-exceptions.yaml and writes $RUNNER_TEMP/.ta-validator-exceptions.yaml.
  • The effective file is transported as the ta-validator-exceptions artifact.
  • evaluate copies that file to the add-on's conventional .ta-validator-exceptions.yaml path when present, then runs normal evaluation.
  • Non-PR runs require no exception-specific argument or environment variable.
  • TA Validator owns schema, catalog, target, duplicate, and unused-declaration validation.
  • The default image is pinned by tag and digest. Third-party actions use the repository-standard major version tags; this repository's remote composite actions use full commit references so they resolve before caller checkout.

Related implementation

Revisions and image

  • Reusable workflow head: 44b3866bfe43de043f93f8d9e317616abf3e52c8
  • TA Validator MR head: 2c974a3e03ac35c12832742e5e689729001b8771
  • Published runtime revision: 3fee426db3a8e6a6031a4990fec032f83661ee9b
  • Image: 956110764581.dkr.ecr.us-west-2.amazonaws.com/ta-automation/gs-scorecard:mr-140-3fee426db3a8-amd64
  • Digest: sha256:6208da305520a85a3f067ff26caa66eb91371be3c1a53120d77591db2c1d601c

Review checks

AWS TA end-to-end scenarios

These behavioral runs predate the review follow-up above: they used reusable-workflow revision 77beb8f3b8801e3483f668d773114f08e3a91deb and runtime revision 3fee426db3a8e6a6031a4990fec032f83661ee9b, with no caller image override. Logs confirm the default image resolved to digest sha256:6208da305520a85a3f067ff26caa66eb91371be3c1a53120d77591db2c1d601c. The follow-up changes only replace third-party action commit pins with version tags and address TA Validator input compatibility/report rendering; their exact heads are covered by the review checks above.

The three positive runs have an overall failure conclusion because unrelated PR-title, functional-test-presence, and FOSSA vulnerability jobs failed; their exception preparation and TA Validator jobs succeeded. The two negative runs failed by design at exception preparation. The effective files preserve permanent declarations before temporary declarations, and the three positive reports expose only category and reason in exception metadata. All five test PRs are closed with their branches and workflow history preserved.

Local verification: 13 workflow contract tests and all repository pre-commit hooks passed.

@mkolasinski-splunk
mkolasinski-splunk requested a review from a team as a code owner September 17, 2026 07:27
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-24T10:03:16.436410Z 44b3866 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 84f5cf6264

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/actions/collect-gssa-suppressions/index.js Outdated
Comment thread .github/actions/collect-gssa-suppressions/parser.js Outdated
@mkolasinski-splunk
mkolasinski-splunk force-pushed the codex/pr-scoped-gssa-xfail-workflow branch from 84f5cf6 to 3e77213 Compare September 17, 2026 07:51

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 04055f2542

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/reusable-build-test-release.yml Outdated
@mkolasinski-splunk
mkolasinski-splunk force-pushed the codex/pr-scoped-gssa-xfail-workflow branch from bd21624 to 824a474 Compare September 21, 2026 13:36

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 824a474a68

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/actions/prepare-ta-validator-exceptions/prepare.py Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cd7857318a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread README.md Outdated
Comment thread .github/workflows/reusable-build-test-release.yml Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9b2c1bc2d1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1353 to +1355
uses: actions/upload-artifact@v7
with:
name: ta-validator-pr-exceptions

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Overwrite the exception artifact on reruns

When validation initially succeeds and a user follows the README by editing the exception comment and selecting Re-run all jobs, this step uploads ta-validator-pr-exceptions again within the same workflow run. Artifacts are immutable, and the upload-artifact documentation requires overwrite: true to replace an existing name, so preparation fails before run-gs-scorecard can evaluate the edited exceptions. Fresh evidence beyond the prior rerun comment is this newly added fixed-name upload without overwrite handling; enable overwrite or use a unique attempt-specific artifact name that the download step also selects.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 85125abb07

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread README.md
* `python-version` - Python version used for testing, default `3.9`
* `spl2-generate` - when `true` enables SPL2 generation, default `false`
* `gs-image-version` - version of the GS Scorecard Docker image, default `1.2`
* `gs-image-version` - version of the TA Validator Docker image, default `mr-140-0431e2581e5d-amd64` while the paired PR-exception interface is awaiting an official release

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Document the effective-file image as the default

This input reference still names mr-140-0431e2581e5d-amd64, while the workflow default at .github/workflows/reusable-build-test-release.yml:74 and the troubleshooting section at README.md:708 use mr-140-3fee426db3a8-amd64 for the new effective-file interface. A caller following this list and explicitly setting the documented value will override the compatible default with the previous paired-interface image, potentially causing the new merge/effective-file flow to fail.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7b36368d4a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

exit 1
fi
if [ -f "$effective_exceptions_path" ]; then
cp "$effective_exceptions_path" "$GITHUB_WORKSPACE/.ta-validator-exceptions.yaml"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Refuse a symlink at the workspace exception path

On pull requests, this destination is controlled by the checked-out branch, so a committed .ta-validator-exceptions.yaml symlink causes cp to follow the link and overwrite its target rather than installing a regular effective file. This permits a PR to corrupt another writable runner file, such as .git/config, before the credentialed validator runs. GNU cp --help documents --remove-destination as removing the destination before opening it; use that option or explicitly reject/remove a destination symlink first.

Useful? React with 👍 / 👎.

@mkolasinski-splunk mkolasinski-splunk changed the title feat: collect PR-scoped GSSA suppressions feat: add PR-scoped TA Validator exceptions Sep 23, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 77beb8f3b8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

run-gs-scorecard:
name: quality-gs-scorecard
prepare-ta-validator-exceptions:
if: ${{ github.event_name == 'pull_request' }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid gating PRs on unused exception preparation

For docs-only PRs or PRs without execute_gs_scorecard, setup-workflow leaves the scorecard disabled and run-gs-scorecard is skipped, but this job still requests an app token and parses or creates the exception comment. If that unused operation fails—for example because an existing comment is malformed or the app/API is unavailable—the job fails, and pre-publish includes its result without excluding it, so an unselected informational check can make the workflow fail. Gate preparation on execute-gs-scorecard, or ignore its result when that output is false.

Useful? React with 👍 / 👎.

aws-region: us-west-2
- name: Upload GS Scorecard report
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is it intended?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sha references were suggested by agentic readiness skill - let me double check if it's really required.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Changed the newly introduced third-party action references back to the repository-standard version tags in 21887bc. The reusable workflow self-references remain full commit SHAs so its remote composite actions are resolvable before caller checkout; those references were refreshed in 1f6fe7d.

Comment thread README.md
- `SPL_COM_USER` and `SPL_COM_PASSWORD` for AppInspect integration

- Check that the Docker image version specified via the `gs-image-version` workflow input (`GS_IMAGE_VERSION` env var, default `1.2`) exists in the ECR registry. The GS Scorecard tool version is controlled separately via `gs-version` input (`GS_VERSION` env var, default `0.3`).
- Check that the Docker image version specified via the `gs-image-version` workflow input (`GS_IMAGE_VERSION` env var, default `mr-140-3fee426db3a8-amd64`) exists in the ECR registry. This immutable pre-release image implements the effective-file interface; replace it with the compatible official image after the TA Validator release. The TA Validator tool version is controlled separately via `gs-version` input (`GS_VERSION` env var, default `0.3`).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Shouldn't we wait with this PR until MR140 is merged?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, indeed. First TA Validator needs to be released, then this reference needs to be updated.

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.

3 participants