Loading c/cppcheck.yml +19 −12 Original line number Diff line number Diff line --- include: - local: c/generic.yml variables: CPPCHECK_DEFAULT_ARGS: --report-progress --verbose CPPCHECK_EXTRA_ARGS: "" CPPCHECK_ENABLE: all CPPCHECK_EXIT_CODE: 1 c:cppcheck: stage: test image: registry.gitlab.com/just-ci/images/c:latest extends: .c:pre variables: CHECK_PATH: "." # Can be a file DEFAULT_ARGS: "--report-progress --verbose" EXTRA_ARGS: "" ENABLE: "all" ERROR_EXIT_CODE: 1 # Which exit code on failure JOB_PACKAGE: cppcheck-junit script: - cppcheck --xml-version=2 ${DEFAULT_ARGS} ${EXTRA_ARGS} --enable=${ENABLE} --error-exitcode=0 ${CHECK_PATH} 2> cppcheck-result.xml - cppcheck_junit cppcheck-result.xml cppcheck-junit.xml - cppcheck ${EXTRA_ARGS} --enable=${ENABLE} --error-exitcode=${ERROR_EXIT_CODE} ${CHECK_PATH} - !reference [".c:pre", script] - cppcheck --xml-version=2 ${CPPCHECK_DEFAULT_ARGS} ${CPPCHECK_EXTRA_ARGS} --enable=${CPPCHECK_ENABLE} --error-exitcode=${CPPCHECK_EXIT_CODE} . 2> ${CI_PROJECT_DIR}/cppcheck-result.xml after_script: - cppcheck_junit ${CI_PROJECT_DIR}/cppcheck-result.xml ${CI_PROJECT_DIR}/cppcheck-junit.xml needs: [] artifacts: reports: junit: cppcheck-junit.xml when: always c/flawfinder.yml 0 → 100644 +19 −0 Original line number Diff line number Diff line --- # https://dwheeler.com/flawfinder/ include: - local: c/generic.yml variables: FLAWFINDER_ERROR_LEVEL: "3" FLAWFINDER_MIN_LEVEL: "1" FLAWFINDER_DEFAULT_ARGS: --falsepositive --immediate --context FLAWFINDER_EXTRA_ARGS: "" c:flawfinder: extends: .c:pre variables: JOB_PACKAGE: flawfinder script: - !reference [".c:pre", script] - flawfinder ${FLAWFINDER_DEFAULT_ARGS} ${FLAWFINDER_EXTRA_ARGS} --minlevel ${FLAWFINDER_MIN_LEVEL} --error-level=${FLAWFINDER_ERROR_LEVEL} . c/generic.yml 0 → 100644 +19 −0 Original line number Diff line number Diff line --- variables: C_EXCLUDE_PATHS: tests C_EXCLUDE_REGEX: (tests) .c:pre: image: name: registry.gitlab.com/just-ci/images/c:latest entrypoint: [""] stage: test script: - pip3 install -q ${JOB_PACKAGE} && echo "[+] ${JOB_PACKAGE} successfully installed." - | echo "[*] Job info:" echo "Context path: ${C_CONTEXT:=.}" echo "Excluded paths: ${C_EXCLUDE_PATHS:-(not specified)}" echo "Excluded regex: ${C_EXCLUDE_REGEX:-(not specified)}" - cd ${C_CONTEXT} pipelines/c.yml +1 −5 Original line number Diff line number Diff line --- include: - local: project-automation/workflow.yml - local: python/flawfinder.yml - local: c/flawfinder.yml - local: c/cppcheck.yml variables: FLAWFINDER_ERROR_LEVEL: "3" DIRECTORIES: "." python/bandit.yml +1 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ variables: python:bandit: extends: .python:pre variables: PACKAGE: bandit JOB_PACKAGE: bandit script: - !reference [".python:pre", script] - BANDIT_EXCLUDE_PATHS="./$(echo ${PYTHON_EXCLUDE_PATHS} | sed Loading Loading
c/cppcheck.yml +19 −12 Original line number Diff line number Diff line --- include: - local: c/generic.yml variables: CPPCHECK_DEFAULT_ARGS: --report-progress --verbose CPPCHECK_EXTRA_ARGS: "" CPPCHECK_ENABLE: all CPPCHECK_EXIT_CODE: 1 c:cppcheck: stage: test image: registry.gitlab.com/just-ci/images/c:latest extends: .c:pre variables: CHECK_PATH: "." # Can be a file DEFAULT_ARGS: "--report-progress --verbose" EXTRA_ARGS: "" ENABLE: "all" ERROR_EXIT_CODE: 1 # Which exit code on failure JOB_PACKAGE: cppcheck-junit script: - cppcheck --xml-version=2 ${DEFAULT_ARGS} ${EXTRA_ARGS} --enable=${ENABLE} --error-exitcode=0 ${CHECK_PATH} 2> cppcheck-result.xml - cppcheck_junit cppcheck-result.xml cppcheck-junit.xml - cppcheck ${EXTRA_ARGS} --enable=${ENABLE} --error-exitcode=${ERROR_EXIT_CODE} ${CHECK_PATH} - !reference [".c:pre", script] - cppcheck --xml-version=2 ${CPPCHECK_DEFAULT_ARGS} ${CPPCHECK_EXTRA_ARGS} --enable=${CPPCHECK_ENABLE} --error-exitcode=${CPPCHECK_EXIT_CODE} . 2> ${CI_PROJECT_DIR}/cppcheck-result.xml after_script: - cppcheck_junit ${CI_PROJECT_DIR}/cppcheck-result.xml ${CI_PROJECT_DIR}/cppcheck-junit.xml needs: [] artifacts: reports: junit: cppcheck-junit.xml when: always
c/flawfinder.yml 0 → 100644 +19 −0 Original line number Diff line number Diff line --- # https://dwheeler.com/flawfinder/ include: - local: c/generic.yml variables: FLAWFINDER_ERROR_LEVEL: "3" FLAWFINDER_MIN_LEVEL: "1" FLAWFINDER_DEFAULT_ARGS: --falsepositive --immediate --context FLAWFINDER_EXTRA_ARGS: "" c:flawfinder: extends: .c:pre variables: JOB_PACKAGE: flawfinder script: - !reference [".c:pre", script] - flawfinder ${FLAWFINDER_DEFAULT_ARGS} ${FLAWFINDER_EXTRA_ARGS} --minlevel ${FLAWFINDER_MIN_LEVEL} --error-level=${FLAWFINDER_ERROR_LEVEL} .
c/generic.yml 0 → 100644 +19 −0 Original line number Diff line number Diff line --- variables: C_EXCLUDE_PATHS: tests C_EXCLUDE_REGEX: (tests) .c:pre: image: name: registry.gitlab.com/just-ci/images/c:latest entrypoint: [""] stage: test script: - pip3 install -q ${JOB_PACKAGE} && echo "[+] ${JOB_PACKAGE} successfully installed." - | echo "[*] Job info:" echo "Context path: ${C_CONTEXT:=.}" echo "Excluded paths: ${C_EXCLUDE_PATHS:-(not specified)}" echo "Excluded regex: ${C_EXCLUDE_REGEX:-(not specified)}" - cd ${C_CONTEXT}
pipelines/c.yml +1 −5 Original line number Diff line number Diff line --- include: - local: project-automation/workflow.yml - local: python/flawfinder.yml - local: c/flawfinder.yml - local: c/cppcheck.yml variables: FLAWFINDER_ERROR_LEVEL: "3" DIRECTORIES: "."
python/bandit.yml +1 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ variables: python:bandit: extends: .python:pre variables: PACKAGE: bandit JOB_PACKAGE: bandit script: - !reference [".python:pre", script] - BANDIT_EXCLUDE_PATHS="./$(echo ${PYTHON_EXCLUDE_PATHS} | sed Loading