1# Copyright 2021-2024 The OpenSSL Project Authors. All Rights Reserved.
2#
3# Licensed under the Apache License 2.0 (the "License").  You may not use
4# this file except in compliance with the License.  You can obtain a copy
5# in the file LICENSE in the source distribution or at
6# https://www.openssl.org/source/license.html
7
8name: Static Analysis On Prem
9
10on:
11  schedule:
12    - cron:  '20 0 * * *'
13  workflow_dispatch:
14
15permissions:
16  contents: read
17
18jobs:
19  coverity-analysis:
20    runs-on: ubuntu-latest
21    container: quay.io/openssl-ci/coverity-analysis:2024.3.1
22    steps:
23    - name: Put license
24      run: echo ${{ secrets.COVERITY_LICENSE }} | base64 -d > /opt/coverity-analysis/bin/license.dat
25    - name: Put auth key file
26      run: |
27        echo ${{ secrets.COVERITY_AUTH_KEY }} | base64 -d > /auth_key_file.txt
28        chmod 0600 /auth_key_file.txt
29    - uses: actions/checkout@v4
30    - name: Config
31      run: CC=gcc ./config --banner=Configured --debug enable-fips enable-rc5 enable-md2 enable-ssl3 enable-nextprotoneg enable-ssl3-method enable-weak-ssl-ciphers enable-zlib enable-ec_nistp_64_gcc_128 no-shared enable-buildtest-c++ enable-external-tests -DPEDANTIC
32    - name: Config dump
33      run: ./configdata.pm --dump
34    - name: Make
35      run: cov-build --dir cov-int make -s -j4
36    - name: Analyze
37      run: cov-analyze --dir cov-int --strip-path $(pwd)
38    - name: Commit defects
39      run: cov-commit-defects --url https://coverity.openssl.org:443 --stream OpenSSL --dir cov-int --auth-key-file /auth_key_file.txt
40