From 5acb2860addcf95ad0e92954897730edaa4206a1 Mon Sep 17 00:00:00 2001 From: ArielSAdamsNASA Date: Fri, 21 May 2021 11:52:27 -0500 Subject: [PATCH 1/2] Fix #62, Implement Coding Standard CodeQL --- .github/workflows/codeql-build.yml | 65 ++++++++++++++++++++++++++++-- 1 file changed, 62 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-build.yml b/.github/workflows/codeql-build.yml index 0272764..c9fb202 100644 --- a/.github/workflows/codeql-build.yml +++ b/.github/workflows/codeql-build.yml @@ -2,9 +2,9 @@ name: "CodeQL Analysis" on: push: + pull_request: branches: - main - pull_request: env: SIMULATION: native @@ -13,8 +13,67 @@ env: BUILDTYPE: release jobs: + #Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action. + check-for-duplicates: + runs-on: ubuntu-latest + # Map a step output to a job output + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@master + with: + concurrent_skipping: 'same_content' + skip_after_successful_duplicate: 'true' + do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' + + CodeQL-Security-Build: + needs: check-for-duplicates + if: ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }} + runs-on: ubuntu-18.04 + timeout-minutes: 15 + + steps: + # Checks out a copy of your repository on the ubuntu-latest machine + - name: Checkout bundle + uses: actions/checkout@v2 + with: + repository: nasa/cFS + submodules: true + + - name: Checkout submodule + uses: actions/checkout@v2 + with: + path: apps/sample_lib + + - name: Check versions + run: git submodule + + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: c + config-file: nasa/cFS/.github/codeql/codeql-security.yml@main + + # Setup the build system + - name: Set up for build + run: | + cp ./cfe/cmake/Makefile.sample Makefile + cp -r ./cfe/cmake/sample_defs sample_defs + make prep + + # Build the code + - name: Build + run: | + make sample_lib + make native/default_cpu1/apps/sample_lib/unit-test/ + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 - CodeQL-Build: + CodeQL-Coding-Standard-Build: + needs: check-for-duplicates + if: ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }} runs-on: ubuntu-18.04 timeout-minutes: 15 @@ -38,7 +97,7 @@ jobs: uses: github/codeql-action/init@v1 with: languages: c - queries: +security-extended, security-and-quality + config-file: nasa/cFS/.github/codeql/codeql-coding-standard.yml@main # Setup the build system - name: Set up for build From 2023352f3df61c3186de3724216447187c728d1b Mon Sep 17 00:00:00 2001 From: "Gerardo E. Cruz-Ortiz" <59618057+astrogeco@users.noreply.github.com> Date: Thu, 24 Jun 2021 12:13:27 -0400 Subject: [PATCH 2/2] IC:2021-06-22, Bump to v1.2.0-rc1+dev38 **Development Version** - Remove github issue number references from development version history --- README.md | 9 +++++++-- fsw/src/sample_lib_version.h | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 34e155f..1a1e4f6 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,11 @@ sample_lib implements SAMPLE_Function, as an example for how to build and link a ## Version History +### Development Build: v1.2.0-rc1+dev38 + +- Implement Coding Standard in CodeQL workflow +- See and + ### Development Build: v1.2.0-rc1+dev34 - Replace direct ref to ArgPtr with `UT_Hook_GetArgValueByName` macro. Reading the pointer directly is not advised. @@ -24,8 +29,8 @@ sample_lib implements SAMPLE_Function, as an example for how to build and link a ### Development Build: v1.2.0-rc1+dev24 -- Fix #46, simplify build to use wrappers and interface libs -- Fix #48, Add Testing Tools to the Security Policy +- Simplify build to use wrappers and interface libs +- Add Testing Tools to the Security Policy - See ### Development Build: v1.2.0-rc1+dev10 diff --git a/fsw/src/sample_lib_version.h b/fsw/src/sample_lib_version.h index 766b4e5..4b1d494 100644 --- a/fsw/src/sample_lib_version.h +++ b/fsw/src/sample_lib_version.h @@ -32,7 +32,7 @@ /* Development Build Macro Definitions */ -#define SAMPLE_LIB_BUILD_NUMBER 34 /*!< Development Build: Number of commits since baseline */ +#define SAMPLE_LIB_BUILD_NUMBER 38 /*!< Development Build: Number of commits since baseline */ #define SAMPLE_LIB_BUILD_BASELINE \ "v1.2.0-rc1" /*!< Development Build: git tag that is the base for the current development */