Skip to content

[StepSecurity] ci: Harden GitHub Actions #18

[StepSecurity] ci: Harden GitHub Actions

[StepSecurity] ci: Harden GitHub Actions #18

Workflow file for this run

# MegaLinter workflow customized for FitFileViewer
name: MegaLinter
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: megalinter-${{ github.ref }}
cancel-in-progress: false
jobs:
megalinter:
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: MegaLinter
id: megalinter
uses: oxsecurity/megalinter@5a91fb06c83d0e69fbd23756d47438aa723b4a5a # v8.7.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DISABLE_LINTERS: SPELL_CSPELL
EXCLUDED_DIRECTORIES: libs, tests, screenshots, node_modules, icons
SHOW_ELAPSED_TIME: true
GITHUB_STATUS_REPORTER: true
FILEIO_REPORTER: true
GITHUB_COMMENT_REPORTER: true
JSON_REPORTER: true
JSON_REPORTER_OUTPUT_DETAIL: true
MARKDOWN_SUMMARY_REPORTER: true
SARIF_REPORTER: true
TAP_REPORTER: true
TAP_REPORTER_OUTPUT_DETAIL: true
DISABLE_ERRORS: true
JAVASCRIPT_DEFAULT_STYLE: prettier
PRINT_ALL_FILES: true
# Upload MegaLinter artifacts
- name: Archive production artifacts
if: success() || failure()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: MegaLinter reports
path: |
megalinter-reports
mega-linter.log
continue-on-error: true