Skip to content

Adding mastg, maswe and mobileapp api v2.0 - #3471

Merged
sydseter merged 8 commits into
masterfrom
mobile-api2
Sep 9, 2026
Merged

Adding mastg, maswe and mobileapp api v2.0#3471
sydseter merged 8 commits into
masterfrom
mobile-api2

Conversation

@sydseter

@sydseter sydseter commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Description

Adding endpoints for fetching the maswe, mastg, cre, and general mobileapp edition mapping.

AI Tool Disclosure

  • My contribution does not include any AI-generated content
  • My contribution includes AI-generated content, as disclosed below:
    • AI Tools: GitHub CoPilot
    • LLMs and versions: GPT-5.6 Luna, Thinking level: High, Context size: 200K
    • Prompts: similar to cornucopia.owasp.org\src\routes\api\asvs\[edition]\[version] and cornucopia.owasp.org\src\routes\api\capec\[edition]\[version] create server.ts controllers for exposing the mobileapp-mastgt-2.0.yaml and the mobileapp-maswe-2.0.yaml mapping. Add relevant swagger documentation and add the endpoints to svelte.config.js , headers-stage.js and headers.js with the headers needed for exposing the application/json api through cloudflare workers. Also make sure the test coverage is 95% and that you follow the linting rules of the cornucopia.owasp.org project. Ensure the api has the same structure as the other api's expect for the necessary changes due to the fact that these expose the maswe and mastg mapping.

Affirmation

@qltysh

qltysh Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

All good ✅

Comment thread cornucopia.owasp.org/script/headers-stage.js Outdated
Comment thread cornucopia.owasp.org/script/headers.js Outdated
Comment thread cornucopia.owasp.org/src/lib/services/mastgService.ts
Comment thread cornucopia.owasp.org/src/lib/services/masweService.ts
Comment thread cornucopia.owasp.org/src/routes/api/mastg/[edition]/[version]/+server.ts Outdated
Comment thread cornucopia.owasp.org/src/routes/api/maswe/[edition]/[version]/+server.ts Outdated

This comment was marked as outdated.

sydseter and others added 3 commits September 8, 2026 16:06
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment thread cornucopia.owasp.org/script/headers-stage.js Outdated

This comment was marked as outdated.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Broad API and deployment changes plus inconsistent OpenAPI examples warrant final human review.

Review details

Suppressed comments (2)

cornucopia.owasp.org/static/api/openapi.yaml:571

  • The example is now identified as version 2.0, but its data/M01 payload does not match this endpoint: CreController.getCreMapping returns a standards array, and Mobile App 2.0 card IDs begin with values such as PC2. Please replace the example body with an actual 2.0 response so the newly documented endpoint is usable by consumers.
                      version: "2.0"

cornucopia.owasp.org/static/api/openapi.yaml:390

  • This labels the example as a 2.0 response, but the PC3 payload below is still the 1.1 data (PLATFORM-3 and TEST-0008/TEST-0037/TEST-0057). The 2.0 mapping instead uses numeric MASTG IDs and MASWE fields, so clients copying this example receive a contradictory contract. Either update the payload from mobileapp-mappings-2.0.yaml or keep this example identified as 1.1.
                      version: "2.0"
  • Files reviewed: 15/15 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@sydseter
sydseter marked this pull request as ready for review September 8, 2026 15:14
@sydseter
sydseter requested a review from rewtd as a code owner September 8, 2026 15:14
@sydseter
sydseter merged commit f5e867b into master Sep 9, 2026
18 checks passed
@sydseter
sydseter deleted the mobile-api2 branch September 9, 2026 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants