Skip to content

Commit

Permalink
Merge pull request #71 from felddy/improvement/cii_shield
Browse files Browse the repository at this point in the history
Add CII shield and harden CodeQL
  • Loading branch information
felddy authored Apr 26, 2022
2 parents 0c5ef9c + 52880be commit 17889a5
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 16 deletions.
48 changes: 32 additions & 16 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,57 @@
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
# Dependabot triggered push events have read-only access, but uploading code
# scanning requires write access.
branches-ignore: [dependabot/**]
branches: [develop]
pull_request:
# The branches below must be a subset of the branches above
branches: [develop]
schedule:
- cron: '0 21 * * 6'

permissions:
actions: read
contents: read

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript',
# 'python']
language: ['python']
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript',
# 'python', 'ruby' ] Learn more about CodeQL language support at
# https://git.io/codeql-language-support

steps:
- name: Harden Runner
uses: step-security/harden-runner@34cbc43f0b10c9dda284e663cf43c2ebaf83e956
with:
# TODO: change to 'egress-policy: block' after couple of runs
egress-policy: audit

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

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@1ed1437484560351c5be56cf73a48a279d116b78
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a
Expand All @@ -52,18 +68,18 @@ jobs:
# Java). If this step fails, then you should remove it and run the build
# manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@1ed1437484560351c5be56cf73a48a279d116b78

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell. 📚
# https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following
# three lines and modify them (or add more) to build your code if your
# project uses a compiled language
# three lines and modify them (or add more) to build your code if your
# project uses a compiled language

# - run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@1ed1437484560351c5be56cf73a48a279d116b78
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# weewx-docker 🌩🐳 #

[![GitHub Build Status](https://github.com/felddy/weewx-docker/workflows/build/badge.svg)](https://github.com/felddy/weewx-docker/actions)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/6003/badge)](https://bestpractices.coreinfrastructure.org/projects/6003)
[![CodeQL](https://github.com/felddy/weewx-docker/workflows/CodeQL/badge.svg)](https://github.com/felddy/weewx-docker/actions/workflows/codeql-analysis.yml)
[![WeeWX Version](https://img.shields.io/github/v/release/felddy/weewx-docker?color=brightgreen)](https://hub.docker.com/r/felddy/weewx)

Expand Down

0 comments on commit 17889a5

Please sign in to comment.