Files
mobsf-testing-sample-app/.gitea/workflows/mobsf.yml
Rajendra Reddy c022ea54ce
All checks were successful
MobSF Security Scan / mobsf-analysis (push) Successful in 13s
Update .gitea/workflows/mobsf.yml
2026-02-18 19:19:32 +00:00

49 lines
1.7 KiB
YAML

name: MobSF Security Scan
on: [push]
jobs:
mobsf-analysis:
runs-on: ubuntu-latest
steps:
# 1. Checkout code into the runner's workspace
- name: Checkout Code
uses: https://github.com/actions/checkout@v4
# 2. Prepare the environment
# We create the report file first so the upload step doesn't crash if scan is clean
- name: Prepare Report File
run: |
echo "<html><body><h1>MobSF Scan Results</h1><p>No vulnerabilities were detected in this run.</p></body></html>" > report.html
chmod 777 report.html
- name: Debug Workspace Files
run: |
echo "Files in /workspace:"
ls -R
# 3. Run MobSF Scan using Docker
# We mount the Gitea Workspace volume into the MobSF container
# - name: Run MobSF Scan
# run: |
# docker run --rm \
# -v "${{ github.workspace }}:/src" \
# opensecurity/mobsfscan:latest \
# /src --html --output /src/report.html || true
## ... previous steps ...
- name: Run MobSF Scan
run: |
# 1. We added --type directory to stop it from ignoring "non-android" files
# 2. We added -v for verbose output so we can see what it's doing
docker run --rm \
-v "${{ github.workspace }}:/src" \
opensecurity/mobsfscan:latest \
/src --type directory --html --output /src/report.html || true
# ... upload steps ...
# 4. Upload using the Gitea-compatible v3 action
- name: Upload Report to Gitea
uses: https://gitea.com/actions/upload-artifact@v3
with:
name: MobSF-Security-Report
path: report.html