Skip to content

Commit 9c24131

Browse files
Merge pull request #8 from QuantumNeuralCoder/cfn-guard-action
Minimizing jobs for s-g action
2 parents 25c74ea + c65b024 commit 9c24131

File tree

4 files changed

+4
-37
lines changed

4 files changed

+4
-37
lines changed

.github/workflows/security-guardian.yml

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -16,48 +16,15 @@ on:
1616
types: [completed]
1717

1818
jobs:
19-
download-if-workflow-run:
20-
runs-on: ubuntu-latest
21-
outputs:
22-
pr_number: ${{ steps.pr_output.outputs.pr_number }}
23-
pr_sha: ${{ steps.pr_output.outputs.pr_sha }}
24-
# if conditions on all individual steps because subsequent jobs depend on this job
25-
# and we cannot skip it entirely
26-
steps:
27-
- name: 'Download workflow_run artifact'
28-
if: github.event_name == 'workflow_run'
29-
uses: dawidd6/action-download-artifact@v9
30-
with:
31-
run_id: ${{ github.event.workflow_run.id }}
32-
name: pr_info
33-
path: pr/
34-
search_artifacts: true
35-
36-
- name: 'Determine PR info'
37-
# PR info comes from the artifact if downloaded, or GitHub context if not.
38-
if: github.event_name == 'workflow_run'
39-
id: 'pr_output'
40-
run: |
41-
if [[ ! -f pr/pr_number ]]; then
42-
echo "${{ github.event.pull_request.number }}" > pr/pr_number
43-
fi
44-
if [[ ! -f pr/pr_sha ]]; then
45-
echo "${{ github.event.pull_request.head.sha }}" > pr/pr_sha
46-
fi
47-
cat pr/*
48-
echo "pr_number=$(cat pr/pr_number)" >> "$GITHUB_OUTPUT"
49-
echo "pr_sha=$(cat pr/pr_sha)" >> "$GITHUB_OUTPUT"
50-
5119
run-security-guardian:
5220
# Necessary to have sufficient permissions to write to the PR
5321
permissions:
5422
contents: read
55-
pull-requests: write
23+
pull-requests: read
5624
statuses: read
5725
issues: read
5826
checks: read
5927
runs-on: ubuntu-latest
60-
needs: download-if-workflow-run
6128
steps:
6229
- name: Checkout
6330
uses: actions/checkout@v4

tools/@aws-cdk/security-guardian/test/templates/CMCMK-Stack.template.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"Resources": {
3-
"LambdaExecutionRoleD5C26073": {
3+
"LambdaExecutionRoleD5C26073": {
44
"Type": "AWS::IAM::Role",
55
"Properties": {
66
"AssumeRolePolicyDocument": {

tools/@aws-cdk/security-guardian/test/templates/StagingStack-default-resourcesmax-ACCOUNT-REGION.template.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"CdkFileRoleE26CEABA": {
55
"Type": "AWS::IAM::Role",
66
"Properties": {
7-
"AssumeRolePolicyDocument": {
7+
"AssumeRolePolicyDocument": {
88
"Statement": [
99
{
1010
"Action": "sts:AssumeRole",

tools/@aws-cdk/security-guardian/test/templates/codepipelinenestedstackPipelineCrossRegionStack37C990C7.nested.template.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
]
103103
}
104104
},
105-
"PipelineArtifactsBucketEncryptionKey01D58D69": {
105+
"PipelineArtifactsBucketEncryptionKey01D58D69": {
106106
"Type": "AWS::KMS::Key",
107107
"Properties": {
108108
"KeyPolicy": {

0 commit comments

Comments
 (0)