From bcd991b19a9daeaae7d31010bca902520e9e9cea Mon Sep 17 00:00:00 2001 From: ArielSAdamsNASA Date: Fri, 21 May 2021 08:53:11 -0500 Subject: [PATCH 1/3] Fix #179, Implement Coding Standard CodeQL --- .github/workflows/codeql-build.yml | 63 ++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-build.yml b/.github/workflows/codeql-build.yml index 1e7e898..f4b9a89 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,23 @@ 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-Build: + CodeQL-Security-Build: + needs: check-for-duplicates + if: ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }} runs-on: ubuntu-18.04 timeout-minutes: 15 @@ -38,7 +53,7 @@ jobs: uses: github/codeql-action/init@v1 with: languages: c - queries: +security-extended, security-and-quality + config-file: nasa/cFS/.github/codeql/codeql-security.yml@main # Setup the build system - name: Set up for build @@ -53,3 +68,45 @@ jobs: - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v1 + + 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 + + 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: tools/cFS-GroundSystem + + - 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-coding-standard.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 tools/cFS-GroundSystem/Subsystems/cmdUtil/ + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 \ No newline at end of file From 33ee0fa1333c5bb98dbcb51525b7c71f8044b924 Mon Sep 17 00:00:00 2001 From: Jacob Hageman Date: Thu, 10 Jun 2021 18:24:36 +0000 Subject: [PATCH 2/3] Fix #181, Add test start command script for cmdUtil --- Subsystems/cmdUtil/es-delete-app.sh | 2 +- Subsystems/cmdUtil/start-test-app.sh | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100755 Subsystems/cmdUtil/start-test-app.sh diff --git a/Subsystems/cmdUtil/es-delete-app.sh b/Subsystems/cmdUtil/es-delete-app.sh index aa694ee..52c8714 100755 --- a/Subsystems/cmdUtil/es-delete-app.sh +++ b/Subsystems/cmdUtil/es-delete-app.sh @@ -1,3 +1,3 @@ # es-delete-app.sh : This script will call the cmdUtil program with a command packet to the -# ES cFE application. It will tell ES to delete the TO App. It is defaulting to the localhost. +# ES cFE application. It will tell ES to delete the named. It is defaulting to the localhost. ./cmdUtil --pktid=0x1806 --cmdcode=5 --string="20:ES_APP" diff --git a/Subsystems/cmdUtil/start-test-app.sh b/Subsystems/cmdUtil/start-test-app.sh new file mode 100755 index 0000000..8bf34b9 --- /dev/null +++ b/Subsystems/cmdUtil/start-test-app.sh @@ -0,0 +1,16 @@ +# Command to start the test application +# CFE_ES_START_APP_CC = 4 +# +# typedef struct CFE_ES_StartAppCmd_Payload +# { +# char Application[CFE_MISSION_MAX_API_LEN]; //CFE_MISSION_MAX_API_LEN = 20 +# char AppEntryPoint[CFE_MISSION_MAX_API_LEN]; +# char AppFileName[CFE_MISSION_MAX_PATH_LEN]; //CFE_MISSION_MAX_PATH_LEN = 64 +# CFE_ES_MemOffset_t StackSize; //uint32 +# CFE_ES_ExceptionAction_Enum_t ExceptionAction; //uint8 +# undocumented SPARE uint8 +# CFE_ES_TaskPriority_Atom_t Priority; //uint16 +# } CFE_ES_StartAppCmd_Payload_t; + +./cmdUtil --pktid=0x1806 --cmdcode=4 --endian=LE --string="20:CFE_TEST_APP" --string="20:CFE_TestMain" \ + --string="64:cfe_testcase" --uint32=16384 --uint8=0 --uint8=0 --uint16=100 From 6d6298058edf067c0bde0cd2c0cc692df7e350fe Mon Sep 17 00:00:00 2001 From: "Gerardo E. Cruz-Ortiz" <59618057+astrogeco@users.noreply.github.com> Date: Wed, 23 Jun 2021 14:20:17 -0400 Subject: [PATCH 3/3] IC:2021-06-22, Bump to v2.2.0-rc1+dev52 *Development Version* - Update Readme - Set Revision number to 99 to match development version pattern from other cFS components --- README.md | 6 ++++++ _version.py | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e75098b..4ea1d33 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,12 @@ See [Guide-GroundSystem.md](https://github.com/nasa/cFS-GroundSystem/blob/master ## Version History +### Development Build: v2.2.0-rc1+dev52 + +- Add test start command script for cmdUtil +- Implement Coding Standard in CodeQL +- See and + ### Development Build: v2.2.0-rc1+dev46 - Changes executable command from 'startg' to 'cFS-GroundSystem' diff --git a/_version.py b/_version.py index 70416a4..aae0667 100644 --- a/_version.py +++ b/_version.py @@ -20,14 +20,14 @@ # # Development Build Macro Definitions -_cFS_GrndSys_build_number = 46 +_cFS_GrndSys_build_number = 52 _cFS_GrndSys_build_baseline = "v2.2.0-rc1" # Version Number Definitions # ONLY APPLY for OFFICIAL release builds _cFS_GrndSys_MAJOR = 2 _cFS_GrndSys_MINOR = 1 -_cFS_GrndSys_REVISION = 0 +_cFS_GrndSys_REVISION = 99 _cFS_GrndSys_MISSIONREV = 0 # Development Build format for __version__