Skip to content

feat(mobile): add unified Security Shepherd Android app#894

Open
SeanDuggan wants to merge 10 commits into
OWASP:devfrom
SeanDuggan:dev#829-app
Open

feat(mobile): add unified Security Shepherd Android app#894
SeanDuggan wants to merge 10 commits into
OWASP:devfrom
SeanDuggan:dev#829-app

Conversation

@SeanDuggan

Copy link
Copy Markdown
Member

Replaces the collection of per-challenge standalone APKs with a single unified app (org.owasp.mobileshepherd) covering all 19 mobile modules: lessons and challenges for Client-Side Injection, Insecure Data Storage, Insecure Communication, Insufficient Cryptography, Reverse Engineering, Poor Authentication, Security Misconfiguration, Privacy Controls, Input Validation, Insecure Authorization, and Supply Chain.

Android app changes:

  • New unified app with Navigation Component and ViewBinding
  • Material Design 3 with dark mode support
  • Full login/registration flow connected to the web platform
  • Progress tracking and scoreboard integration
  • Cheatsheets for all 19 modules
  • CI workflow for Android lint and build

Server-side changes:

  • Add MobileFlagGet, MobileFlagSubmit, MobileInsecureApi, MobileModuleFlags, MobileModuleProgress, MobileModuleStart, MobileRegister servlets
  • Update MobileLogin servlet
  • Update coreSchema.sql with mobile module tables and procedures
  • Add i18n properties for mobile challenge/lesson strings
  • Add Android lint and build GitHub Actions workflows

Replaces the collection of per-challenge standalone APKs with a single
unified app (org.owasp.mobileshepherd) covering all 19 mobile modules:
lessons and challenges for Client-Side Injection, Insecure Data Storage,
Insecure Communication, Insufficient Cryptography, Reverse Engineering,
Poor Authentication, Security Misconfiguration, Privacy Controls,
Input Validation, Insecure Authorization, and Supply Chain.

Android app changes:
- New unified app with Navigation Component and ViewBinding
- Material Design 3 with dark mode support
- Full login/registration flow connected to the web platform
- Progress tracking and scoreboard integration
- Cheatsheets for all 19 modules
- CI workflow for Android lint and build

Server-side changes:
- Add MobileFlagGet, MobileFlagSubmit, MobileInsecureApi, MobileModuleFlags,
  MobileModuleProgress, MobileModuleStart, MobileRegister servlets
- Update MobileLogin servlet
- Update coreSchema.sql with mobile module tables and procedures
- Add i18n properties for mobile challenge/lesson strings
- Add Android lint and build GitHub Actions workflows
SeanDuggan and others added 9 commits June 12, 2026 12:02
MobileFlagGet was calling Getter.hasPlayerStarted() as a DB fallback
for the in-memory module-start cache, but this method does not exist
in upstream's Getter class. Remove the fallback; the in-memory check
in MobileModuleProgress.hasStarted() is sufficient.
…ster

Fix Spotless violations:
- MobileLogin.java: convert CRLF to LF line endings
- MobileRegister.java: reflow Javadoc and method call line breaks
The previous version re-inserted 68 modules that already exist in the
upstream schema, causing PRIMARY KEY violations during integration test
DB setup and failing all IT tests.

Replace with upstream coreSchema.sql and append only the 9 genuinely
new mobile modules:
- Mobile Insecure Authorization (lesson)
- Mobile Insecure Communication (lesson + challenge)
- Mobile Security Misconfiguration (lesson + challenge)
- Mobile Input Validation (lesson)
- Mobile Privacy Controls (lesson)
- Mobile Supply Chain (lesson)
- Mobile Insufficient Cryptography (lesson)

incrementalRank values set to 105-113 (after upstream's highest rank of ~100)
to avoid conflicts.
…edWhereClause

testGetModuleStatusMenuWhenMobileOnlyOpen validates that every module
in the DB belongs to either the web or mobile hardcoded category list.
Our 7 new mobile categories were missing from the list, causing the test
to fail with a count mismatch after openOnlyMobileCategories() was called.
getModulesJson() calls ResourceBundle.getString() for each module's
moduleNameLangPointer and 'category.' + moduleCategoryLangPointer.
Without these keys, a MissingResourceException is thrown mid-iteration,
causing getModulesJson() to return an incomplete JSON array (missing the
modules wrapper element), which breaks LevelsIT and GetterIT tests.

Adds 9 module name keys and 7 category keys for the new modules added
in coreSchema.sql.
Delete 16 DB modules, their JSP pages, cheatsheet entries, locale
keys and solutions that have no corresponding fragment in the Android
app.  These modules (Mobile Broken Crypto x4, Content Provider x2,
Data Leakage x3, RE lesson+RE2+RE3, Untrusted Input, Poor Auth 2,
IDS2+IDS3) were causing IT test failures in
testGetModuleStatusMenuWhenMobileOnlyOpen because the DB module count
diverged from what the Setter where-clause matched.

Also add a dedicated DB module and cheatsheet entry for
InsufficientCryptoChallengeFragment (previously mapped to the deleted
Broken Crypto 1 row) and update MODULE_DB_IDS accordingly.

Removes four empty categories from
mobileModuleCategoryHardcodedWhereClause (Mobile Broken Crypto,
Mobile Content Provider, Mobile Data Leakage, Mobile Security
Decisions via Untrusted Input).
The RE lesson (LessonFragment / nav_lesson) exists on the Android app
and maps to FlagValidator.Module.RE_LESSON in MainActivity.  It was
incorrectly removed in the previous commit.

Restore:
- coreSchema.sql INSERT for module 2ab09c0c (Reverse Engineering lesson)
  and its cheatSheetCreate call
- reverse.engineering locale key in moduleNames.properties
- solutions.properties entry for 2ab09c0c
- The lesson JSP file 19753b94...
- MODULE_DB_IDS entry for re_lesson in MobileModuleFlags
The Content Provider Leakage module (5b461ebe...) was removed from
coreSchema.sql when old mobile modules without app implementations
were deleted. Replace it with the Client Side Injection lesson
(335440fe...) which exists in the current schema and serves the
same purpose in testCheckPlayerResultWhenModuleNotComplete.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant