Skip to content

Malware Scan

Malware Scan #12

Workflow file for this run

name: Malware Scan
on:
schedule:
- cron: '5 3 * * 0'
workflow_dispatch:
jobs:
scan:
name: Malware Scan
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup project
uses: ./.github/actions/setup
with:
npm_fontawesome_auth_token: ${{ secrets.NPM_FONTAWESOME_AUTH_TOKEN }}
packagist_github_token: ${{ secrets.PACKAGIST_GITHUB_TOKEN }}
- name: Install development packages and build assets
run: composer install:development
- name: Install WordPress
uses: ./.github/actions/install-wordpress
- name: Cleanup development files
run: |
composer install --no-dev --no-interaction
rm -rf node_modules/
- name: Run malware scan
uses: generoi/github-action-wordfence-malware-scan@master
with:
license: ${{ secrets.WORDFENCE_CLI_LICENSE }}
args: --exclude-files-pattern=".*/vendor/wp-cli/wp-cli/features/context.feature"
- name: Microsoft Teams Notification
uses: skitionek/notify-microsoft-teams@master
if: failure()
with:
webhook_url: ${{ secrets.MICROSOFT_TEAMS_FAUCET_WEBHOOK }}
raw: >-
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"themeColor": "0076D7",
"summary": "Malware scan failed: ${{ github.event.repository.name }}",
"sections": [{
"activityTitle": "Malware scan failed: ${{ github.event.repository.name }}",
"activitySubtitle": "Potential malware found by Wordfence on ${{ github.event.repository.name }} site",
"facts": [],
"markdown": true
}],
"potentialAction": [{
"@type": "OpenUri",
"name": "Repository",
"targets": [{
"os": "default",
"uri": "${{ github.server_url }}/${{ github.repository }}"
}]
}, {
"@type": "OpenUri",
"name": "Job details",
"targets": [{
"os": "default",
"uri": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}]
}]
}