From 03277cc24bfa901ad253f2893cc4dbb00e9ad16d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alvaro=20Mu=C3=B1oz?= Date: Thu, 14 Mar 2024 11:58:44 +0100 Subject: [PATCH] Add test for self-referencing jobs --- .../CWE-094/.github/workflows/self_needs.yml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 ql/test/query-tests/Security/CWE-094/.github/workflows/self_needs.yml diff --git a/ql/test/query-tests/Security/CWE-094/.github/workflows/self_needs.yml b/ql/test/query-tests/Security/CWE-094/.github/workflows/self_needs.yml new file mode 100644 index 00000000000..afd39605bb3 --- /dev/null +++ b/ql/test/query-tests/Security/CWE-094/.github/workflows/self_needs.yml @@ -0,0 +1,20 @@ +name: Test + +on: + issue_comment: + types: [created] + +jobs: + test1: + runs-on: ubuntu-22.04 + outputs: + job_output: ${{ steps.source.outputs.value }} + steps: + - id: source + uses: mad9000/actions-find-and-replace-string@3 + with: + source: ${{ github.event['head_commit']['message'] }} + find: 'foo' + replace: '' + - run: ${{ steps.source.outputs.value }} + - run: ${{ needs.test1.outputs.job_output }}