Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable GitHub CodeQL static analysis in CI #693

Closed
wants to merge 26 commits into from
Closed
Changes from 23 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
720b103
Create codeql-analysis.yml
yadij Jul 22, 2020
8ba3a3c
Merge branch 'master' into yadij-patch-1
yadij Aug 16, 2020
6e7e1f8
Update codeql-analysis.yml
yadij May 24, 2021
f374231
Merge branch 'master' into yadij-patch-1
yadij May 24, 2021
283da42
Merge branch 'master' into yadij-patch-1
yadij Aug 12, 2021
095d8dc
Merge branch 'master' into yadij-patch-1
yadij Feb 24, 2022
f7f630a
Remove schedule trigger
yadij Oct 7, 2022
6270844
update build task
yadij Oct 7, 2022
e50c544
Merge branch 'master' into yadij-patch-1
yadij Oct 7, 2022
466cb83
update to CodeQL v2
yadij Oct 7, 2022
c52963c
Update codeql-analysis.yml
yadij Oct 7, 2022
faecb38
Remove stable branches for now
yadij Oct 7, 2022
92ec224
Merge branch 'master' into yadij-patch-1
yadij Oct 11, 2022
18e6e9d
Apply suggestions from code review
yadij Oct 12, 2022
7e315fc
merge CodeQL test into default.yaml
yadij Oct 12, 2022
083cdb0
Delete codeql-analysis.yml
yadij Oct 12, 2022
f173fbe
Update default.yaml
yadij Oct 12, 2022
a077699
Update default.yaml
yadij Oct 12, 2022
922fffb
Update default.yaml
yadij Oct 12, 2022
3905849
Merge branch 'master' into yadij-patch-1
yadij May 22, 2023
e54a713
Update .github/workflows/default.yaml
yadij May 22, 2023
a07d6c1
Update .github/workflows/default.yaml
yadij May 22, 2023
4a74f37
Merge branch 'master' into yadij-patch-1
yadij Aug 22, 2023
83a007d
Apply suggestions from code review
yadij Aug 29, 2023
83c994e
Update default.yaml
yadij Aug 29, 2023
d9096ac
Update default.yaml
yadij Aug 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,34 @@ jobs:
with:
name: build-logs-${{ runner.os }}
path: btlayer-*.log

CodeQL-tests:

runs-on: [ ubuntu-22.04 ]

permissions:
security-events: write

steps:

- name: Install Squid prerequisite Linux packages
rousskov marked this conversation as resolved.
Show resolved Hide resolved
if: runner.os == 'Linux'
run: |
# required for "apt-get build-dep" to work
sudo sed --in-place -E 's/# (deb-src.*updates main)/ \1/g' /etc/apt/sources.list
sudo apt-get --quiet=2 update
sudo apt-get --quiet=2 build-dep squid
yadij marked this conversation as resolved.
Show resolved Hide resolved

- name: Checkout repository
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2

- name: Build Squid
run: |
./bootstrap.sh
Copy link
Contributor

Choose a reason for hiding this comment

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

This step produces the following warning:

WARNING: Cannot find libtool version .
./bootstrap.sh: 1: libtool: not found

The functionality-tests job has a sudo apt-get --quiet=2 install libtool-bin step. Other jobs, including this one, rely on build-dep. Evidently, build-dep does not install the libtool binary. The above warning is probably harmless -- the tests succeeded, but we should either install libtool-bin or adjust bootstrap.sh so that it does not trigger that warning. Otherwise, (when the test fails for some other reason,) folks may suspect that the above warning is important/relevant.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a bug in bootstrap.sh. The warning has shown up on every Linux bootstrap.sh execution since a decade ago without causing the cited confusion. It is out of scope for this PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

The warning has shown up on every Linux bootstrap.sh execution since a decade ago without causing the cited confusion.

The warning has already caused the cited problems -- I spent time adjusting the now-official workflow configuration to install the tools necessary to eliminate that warning when the builds were failing for other reasons. You do not have to fix or work around this bug, of course, but rejecting the very existence of the problem only wastes time.

./test-suite/buildtest.sh check ./test-suite/buildtests/layer-02-maximus.opts
yadij marked this conversation as resolved.
Show resolved Hide resolved

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
Loading