From 0dc253945f2b195e41703e36b22045a11a220150 Mon Sep 17 00:00:00 2001 From: Gabriel Becker Date: Mon, 29 Nov 2021 14:39:26 +0100 Subject: [PATCH 1/2] Use forking point commit as base for compare ds job. --- .github/workflows/compare-ds.yaml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/compare-ds.yaml b/.github/workflows/compare-ds.yaml index d6b79ea0013..c6df3a722c7 100644 --- a/.github/workflows/compare-ds.yaml +++ b/.github/workflows/compare-ds.yaml @@ -13,17 +13,27 @@ jobs: run: dnf install -y cmake make openscap-utils python3-pyyaml python3-setuptools python3-jinja2 git python3-deepdiff python3-requests jq python3-pip - name: Install deps python run: pip install gitpython xmldiff - - name: Checkout master + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Find forking point + env: + BASE_BRANCH: ${{ github.base_ref }} + run: echo "::set-output name=FORK_POINT::$(git merge-base --fork-point origin/$BASE_BRANCH)" + id: fork_point + - name: Checkout fork point uses: actions/checkout@v2 with: - ref: master + ref: ${{ steps.fork_point.outputs.FORK_POINT }} + fetch-depth: 0 - name: Checkout (CTF) uses: actions/checkout@v2 with: repository: mildas/content-test-filtering path: ctf - name: Detect content changes in the PR - run: python3 ./ctf/content_test_filtering.py pr --rule --output json ${{ github.event.pull_request.number }} > output.json + run: python3 ./ctf/content_test_filtering.py pr --remote_repo https://github.com/ggbecker/content --rule --output json ${{ github.event.pull_request.number }} > output.json - name: Test if there are no content changes run: echo "::set-output name=CTF_OUTPUT_SIZE::$(stat --printf="%s" output.json)" id: ctf From 94131a7585f554cf33346f760dd6e5e55d18703c Mon Sep 17 00:00:00 2001 From: Gabriel Becker Date: Mon, 29 Nov 2021 14:40:13 +0100 Subject: [PATCH 2/2] Test --- .../services/ssh/ssh_server/sshd_enable_strictmodes/rule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux_os/guide/services/ssh/ssh_server/sshd_enable_strictmodes/rule.yml b/linux_os/guide/services/ssh/ssh_server/sshd_enable_strictmodes/rule.yml index 31968bc560a..b22e2046772 100644 --- a/linux_os/guide/services/ssh/ssh_server/sshd_enable_strictmodes/rule.yml +++ b/linux_os/guide/services/ssh/ssh_server/sshd_enable_strictmodes/rule.yml @@ -56,4 +56,4 @@ template: missing_parameter_pass: 'true' parameter: StrictModes rule_id: sshd_enable_strictmodes - value: 'yes' + value: 'no'