feat(ci): add security check to block .claude/ and .vscode/ directories (#1173) (#1181)

* feat(ci): add security check to block .claude/ and .vscode/ directories

Add workflow that calls the security_check_directories action from
cloud-content-ci-automation to fail PRs containing files under .claude/
or .vscode/ directories.

Integrates with all_green_check.yaml as a required job for PRs.

Ref: ACA-6411



* fix(ci): suppress SonarCloud S7637 for reusable actions using @main

Internal reusable actions from ansible-network/github_actions and
ansible-collections/cloud-content-ci-automation use @main refs for
simpler maintenance. Suppress the 'use full commit SHA' rule for
workflow files.



* fix(ci): use correct org and pin action to commit SHA

Address review feedback:
- Change org from ansible-collections to ansible
- Pin to commit SHA 74b5fe87 instead of @main



* docs: add changelog fragment for security check workflow



* Update changelogs/fragments/1173-security-check-workflow.yml

---------



(cherry picked from commit 6bb9cce51b)

Co-authored-by: GomathiselviS <gomathiselvi@gmail.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Bianca Henderson <beeankha@gmail.com>
This commit is contained in:
patchback[bot]
2026-07-03 08:39:50 -04:00
committed by GitHub
parent 42963f0536
commit 78b82c74f7
4 changed files with 33 additions and 2 deletions

View File

@@ -20,6 +20,10 @@ on: # yamllint disable-line rule:truthy
- stable-*
jobs:
security-check:
if: github.event_name == 'pull_request'
uses: ./.github/workflows/security-check.yaml
linters:
if: github.event_name == 'pull_request'
uses: ./.github/workflows/linters.yaml
@@ -68,6 +72,7 @@ jobs:
all_green:
if: ${{ always() }}
needs:
- security-check
- linters
- sanity
- units
@@ -80,8 +85,9 @@ jobs:
required = ['sanity', 'units', 'coverage']
if '${{ github.event_name }}' == 'pull_request':
required = ['linters', 'sanity', 'units', 'coverage']
required = ['security-check', 'linters', 'sanity', 'units', 'coverage']
results = {
'security-check': '${{ needs.security-check.result }}',
'linters': '${{ needs.linters.result }}',
'sanity': '${{ needs.sanity.result }}',
'units': '${{ needs.units.result }}',