Update .gitea/workflows/mobsf.yml
All checks were successful
MobSF Security Scan / mobsf-analysis (push) Successful in 12s
All checks were successful
MobSF Security Scan / mobsf-analysis (push) Successful in 12s
This commit is contained in:
@@ -5,43 +5,23 @@ jobs:
|
|||||||
mobsf-analysis:
|
mobsf-analysis:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
# 1. Checkout code into the runner's workspace
|
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: https://github.com/actions/checkout@v4
|
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
|
- name: Prepare Report File
|
||||||
run: |
|
run: |
|
||||||
echo "<html><body><h1>MobSF Scan Results</h1><p>No vulnerabilities were detected in this run.</p></body></html>" > report.html
|
echo "<html><body><h1>Scan Results</h1><p>No issues found.</p></body></html>" > report.html
|
||||||
chmod 777 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
|
- name: Run MobSF Scan
|
||||||
run: |
|
run: |
|
||||||
# 1. We added --type directory to stop it from ignoring "non-android" files
|
# We scan the root ('.') and use verbose (-v) to see what is happening
|
||||||
# 2. We added -v for verbose output so we can see what it's doing
|
# We use --no-fail so the step doesn't crash Gitea before we upload the report
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
-v "${{ github.workspace }}:/src" \
|
-v "${{ github.workspace }}:/src" \
|
||||||
opensecurity/mobsfscan:latest \
|
opensecurity/mobsfscan:latest \
|
||||||
/src --type directory --html --output /src/report.html || true
|
-v --no-fail --html -o /src/report.html /src
|
||||||
|
|
||||||
# ... upload steps ...
|
|
||||||
|
|
||||||
# 4. Upload using the Gitea-compatible v3 action
|
|
||||||
- name: Upload Report to Gitea
|
- name: Upload Report to Gitea
|
||||||
uses: https://gitea.com/actions/upload-artifact@v3
|
uses: https://gitea.com/actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user