Skip to content

Commit 37cdb48

Browse files
committed
Merge branch 'master' into port-MASTG-TEST-0033
2 parents 352e94f + f47b82b commit 37cdb48

File tree

158 files changed

+12718
-594
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

158 files changed

+12718
-594
lines changed
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
---
2+
description: 'Documentation and content creation standards'
3+
applyTo: '**/*.md'
4+
---
5+
6+
## Markdown Content Rules
7+
8+
The following markdown content rules are enforced in the validators:
9+
10+
1. **Headings**: Use appropriate heading levels (H2, H3, etc.) to structure your content. Do not use an H1 heading, as this will be generated based on the title.
11+
2. **Lists**: Use bullet points or numbered lists for lists. Ensure proper indentation and spacing.
12+
3. **Code Blocks**: Use fenced code blocks for code snippets. Specify the language for syntax highlighting.
13+
4. **Links**: Use standard Markdown link syntax.
14+
5. **Images**: Use HTML `<img>` tags for images. See the "Images" section for examples and guidelines.
15+
6. **Tables**: Use markdown tables for tabular data. Ensure proper formatting and alignment.
16+
7. **Whitespace**: Use appropriate whitespace to separate sections and improve readability.
17+
8. **Front Matter**: Include YAML front matter at the beginning of the file with required metadata fields.
18+
19+
## Formatting and Structure
20+
21+
Follow these guidelines for formatting and structuring your markdown content:
22+
23+
- **Headings**: Use `##` for H2 and `###` for H3. Ensure that headings are used hierarchically. Recommend restructuring if the content includes H4, and more strongly recommend for H5.
24+
- **Lists**: Use `-` for bullet points and `1.` for numbered lists. Indent nested lists with four spaces to match the linter configuration. Prefer dashes `-` over asterisks `*` for unordered lists. Generally:
25+
- Limit a single list to at most nine items when reasonable.
26+
- Avoid more than two levels of nesting.
27+
- Punctuate and capitalize list items consistently. Do not add end punctuation to list items that are not complete sentences unless they complete the introductory sentence. If list items complete an introductory sentence, end each (except the last) with a comma, omit the "and" before the last, and end the last item with appropriate punctuation.
28+
- **Code Blocks**: Use triple backticks to create fenced code blocks. Specify the language after the opening backticks for syntax highlighting (e.g., kt, java, xml).
29+
- **Links**: Ensure the link text is descriptive and the URL is valid.
30+
- **Tables**: Use `|` to create tables. Ensure that columns are properly aligned and headers are included.
31+
- Include leading and trailing pipes to conform to the linter setting (MD055: `leading_and_trailing`).
32+
- **Line Length**: There is no enforced hard limit.
33+
- **Whitespace**: Use blank lines to separate sections and improve readability. Avoid excessive whitespace.
34+
35+
### Writing Style and Tone
36+
37+
- Keep content factual, brief, and focused. Avoid duplicating other sections of the guide and refrain from advertising commercial tools or services.
38+
- Address the reader directly in the second person ("you"). Prefer active voice over passive voice.
39+
- Ensure cohesion and coherence: link ideas logically; keep each paragraph focused on one idea; lead sections with the key point; use bullet points for scannability when appropriate.
40+
- Write for an international audience with a basic technical background. Avoid hard-to-translate slang.
41+
- Provide context and orientation: use a unique page heading, a concise introduction, and links to background information where helpful.
42+
43+
### Content Length and Organization
44+
45+
- Use short, scannable pages where possible (roughly one to two screens of text). For extensive sections, consider moving details to a supporting document and linking to it for clarity and conciseness.
46+
- For digital content, favor shorter, cross-linked pages. If the content is intended for print, longer, comprehensive pages are acceptable.
47+
48+
### Gender Neutrality
49+
50+
- Avoid gendered pronouns (she/her/hers/herself, he/him/his/himself) and constructions like "he/she", "s/he", "his or her".
51+
- Prefer alternatives:
52+
- Omit the pronoun where possible.
53+
- Use articles ("the", "a") where appropriate.
54+
- Use plural nouns and pronouns ("they") when it improves clarity.
55+
- Use the second person ("you") or imperative form.
56+
57+
### Language and Conventions
58+
59+
- Use American spelling and terminology.
60+
- Title capitalization follows the Chicago Manual of Style:
61+
- Capitalize first and last words; nouns, pronouns, verbs, adjectives, adverbs, and subordinating conjunctions.
62+
- Lowercase articles, prepositions, and coordinating conjunctions (except when first or last).
63+
- Numbers: spell out zero through ten; use numerals for numbers greater than ten.
64+
- Android versions: write as "Android X (API level YY)" and avoid codenames.
65+
- Contractions: prefer common contractions (e.g., "don't", "can't", "it's").
66+
67+
### Abbreviations
68+
69+
- On first use, spell out the term followed by the abbreviation in parentheses; use the abbreviation alone on subsequent uses within the chapter.
70+
- If the term appears only once, prefer the full term instead of the abbreviation.
71+
- In titles/headings, abbreviations are acceptable, but introduce them properly in the following text.
72+
- Use "a" or "an" based on pronunciation (e.g., a URL, an APK).
73+
- Form plurals by adding "s" unless the abbreviation already represents a plural noun (e.g., APIs, CSS).
74+
- For common file formats like APK, IPA, or ZIP, do not prefix with a dot unless referring explicitly to the file extension.
75+
76+
### In-project Identifiers
77+
78+
Use special identifiers to reference project components consistently:
79+
80+
- Tests: `@MASTG-TEST-0001`
81+
- Tools: `@MASTG-TOOL-0034`
82+
- Similar patterns may exist for other entities (e.g., best practices, techniques) following `@MASTG-<KIND>-NNNN`.
83+
- Weaknesses: `@MASWE-0123` (this one is an exception to the usual pattern)
84+
85+
Usage rules:
86+
87+
- In body text (Markdown content), include the leading `@` when referencing an item.
88+
- In YAML front matter, omit the `@` and use the bare identifier (e.g., `MASTG-TEST-0001`).
89+
90+
Examples:
91+
92+
```markdown
93+
You can validate this with @MASTG-TEST-0001 and compare results using @MASTG-TOOL-0034.
94+
```
95+
96+
```yaml
97+
weakness: MASWE-0069
98+
best-practices: [MASTG-BEST-0010, MASTG-BEST-0011, MASTG-BEST-0012]
99+
```
100+
101+
### Punctuation and Typographic Conventions
102+
103+
- After a colon, lowercase the first word unless it is a proper noun or starts two or more complete sentences or a direct question.
104+
- Use the serial comma (Oxford comma).
105+
- Use straight quotes and apostrophes (not curly quotes/apostrophes).
106+
- Never use Horizontal rules like `---`.
107+
- Emphasis/strong style: underscores for emphasis (`_text_`), asterisks for strong (`**text**`).
108+
- Trailing punctuation allowed in headings (MD026) is limited to: `.,;:`
109+
- Always prefer commas or parentheses over em-dashes, en-dashes, or hyphens.
110+
111+
## Images
112+
113+
For MASTG chapters and related content, always embed pictures using an HTML `<img>` element rather than Markdown image syntax:
114+
115+
- Put `src` as the first attribute.
116+
- Optionally specify a `width` (e.g., `width="80%"`).
117+
- Store images in the appropriate directory (e.g., `Document/Images/Chapters` for MASTG chapters).
118+
- Inline HTML is permitted; the linter rule MD033 is disabled to allow this.
119+
120+
Example:
121+
122+
```markdown
123+
<img src="Images/Chapters/0x05b/r2_pd_10.png" width="80%" />
124+
```
125+
126+
Note: The linter does not require alt text for images (MD045 is disabled); however, including descriptive context in the surrounding text is helpful for accessibility.
127+
128+
## Validation Requirements
129+
130+
Ensure compliance with the following validation requirements:
131+
132+
- **Content Rules**: Ensure that the content follows the markdown content rules specified above.
133+
- **Formatting**: Ensure that the content is appropriately formatted and structured according to the guidelines.
134+
- **Validation**: Run the validation tools to check for compliance with the rules and guidelines.
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Reference Apps Authoring Instructions
2+
3+
Standards for authoring reference application pages under `apps/`. These pages describe vulnerable or exemplary applications used across tests, techniques, and demos.
4+
5+
## Locations
6+
7+
- `apps/android/MASTG-APP-####.md`
8+
- `apps/ios/MASTG-APP-####.md`
9+
- `apps/index.md` is the catalog landing page (don't edit it)
10+
11+
## File naming and IDs
12+
13+
- The filename defines the app ID: `MASTG-APP-\d{4}.md`
14+
- Do not add an `id:` field to the YAML front matter
15+
- Use the next available number in the platform folder. Coordinate in PRs to avoid collisions
16+
17+
## Markdown structure
18+
19+
- Follow the global Markdown rules in `.github/instructions/markdown.instructions.md`
20+
- Headings in the body start at `##`. Use `##` and `###` only
21+
22+
## Metadata
23+
24+
Each file begins with a YAML front matter block.
25+
26+
**Required**
27+
28+
- `title:` App name, use the official capitalization. Add a disambiguator if needed (for example, *Android UnCrackable L1*)
29+
- `platform:` One of `android`, `ios`
30+
- `package:` Android application package ID or iOS bundle identifier (for example, `com.example.app`)
31+
- `source:` Canonical page to obtain the app (official repo, release artifact, or MASTG crackmes catalog entry). Prefer a stable, versioned URL
32+
33+
**Optional**
34+
35+
- `download_url`: URL to download the APK/IPA.
36+
- `store_url:` Store listing URL if relevant (e.g. Google Play, App Store)
37+
- `status:` use `placeholder` only if it's a draft, otherwise do not include `status` (default is `new` and you don't have to add it explicitly)
38+
39+
**Examples**
40+
41+
```yaml
42+
---
43+
title: Android UnCrackable L1
44+
platform: android
45+
source: https://mas.owasp.org/crackmes/Android#android-uncrackable-l1
46+
package: sg.vantagepoint.uncrackable1
47+
---
48+
```
49+
50+
## Body content
51+
52+
Entries should be short and referential. Do not duplicate installation or usage docs that belong in the app’s own repository.
53+
54+
- One or two sentences describing the app and its purpose
55+
- Add any platform-specific hints, such as jailbreak expectations or proxy setup
56+
57+
### Cross-linking
58+
59+
In the YAML front matter, add `weaknesses` listing all the weaknesses from the MASWE that can be tested and are present in the app.
60+
61+
Example:
62+
63+
```md
64+
weaknesses: [MASWE-0034, MASWE-0056]
65+
```
66+
67+
Do not add specific app versions here. If a MASTG-DEMO requires a particular version of an app, document it in the demo, not in the app entry.
68+
69+
## Writing conventions
70+
71+
- Use the official app name and capitalization
72+
- Prefer official sources or the MASTG Crackmes catalog for downloads
73+
74+
## Deprecation
75+
76+
If the original source is gone, not relevant anymore, or too old, set the following in the YAML front matter:
77+
78+
- `status:` Must be set to `deprecated`
79+
- `deprecation_note:` Short clarifying note for deprecation. Keep phrasing concise and imperative
80+
- `covered_by:` List of MASTG-APP-xxxx apps covering for this one, if any.
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
## Best Practices
2+
3+
[https://mas.owasp.org/MASTG/best-practices/](https://mas.owasp.org/MASTG/best-practices/)
4+
[https://github.com/OWASP/owasp-mastg/tree/master/best-practices](https://github.com/OWASP/owasp-mastg/tree/master/best-practices)
5+
6+
Best practices live under `best-practices/` and each file name must be the best-practice ID, for example `MASTG-BEST-0001.md`.
7+
8+
Best practices must be linked from MASTG tests using the `best-practices:` key in the test’s YAML front matter (use bare IDs, without the leading @).
9+
10+
They must include official references. You can cite the MASTG as a hub only when it points to official sources (for example, Google/Apple documentation, standards, or vendor advisories).
11+
12+
Scope and relationship to Knowledge:
13+
14+
- Best Practices are prescriptive: they state what to do and why from a security perspective.
15+
- Keep background explanations minimal; for conceptual background on OS features, link to Knowledge pages under `knowledge/`.
16+
17+
### Markdown: Metadata
18+
19+
Include a YAML front matter block with the following fields:
20+
21+
- title: Concise, action-oriented recommendation.
22+
- id: Best-practice ID in the form `MASTG-BEST-\d{4}`.
23+
- platform: One of: android, ios.
24+
25+
Optional metadata:
26+
27+
- alias: URL-friendly slug (lowercase, hyphen-separated) used for navigation.
28+
- status: draft, placeholder, deprecated.
29+
- note: Short free-form note.
30+
- available_since: Minimum platform version/API level where this recommendation applies (Android: integer API level; iOS: release version, for example `13`).
31+
- deprecated_since: Last applicable platform/API level.
32+
33+
Example:
34+
35+
```yaml
36+
---
37+
title: Preventing Screenshots and Screen Recording
38+
alias: preventing-screenshots-and-screen-recording
39+
id: MASTG-BEST-0014
40+
platform: android
41+
---
42+
```
43+
44+
Notes:
45+
46+
- In body text, reference in-project identifiers with a leading @ (for example, @MASTG-TEST-0252). In YAML front matter, omit the @ and use bare IDs.
47+
48+
Best Practices should contain:
49+
50+
- what's the recommendation
51+
- why is that good
52+
- any caveats or considerations (for example, "it's good to have it, but remember it can be bypassed this way")
53+
- official references
54+
55+
### Recommended Structure
56+
57+
Use clear sections to improve readability and enable consistent rendering.
58+
59+
- Overview or Recommendation: State the practice and its scope in one or two short paragraphs. Link to relevant Knowledge pages for background when needed.
60+
- Rationale: Explain the security value and platform implications; keep conceptual detail brief and defer to Knowledge pages.
61+
- Caveats or Considerations: Note limits, bypasses, compatibility constraints, or trade-offs.
62+
- References: Bullet list of official, authoritative sources.
63+
64+
Example References section:
65+
66+
```markdown
67+
## References
68+
69+
- Android docs: https://developer.android.com/security/fraud-prevention/activities#flag_secure
70+
- Apple docs: https://developer.apple.com/documentation
71+
- Standard: https://www.rfc-editor.org
72+
```
73+
74+
### Cross-linking
75+
76+
- From tests: use `best-practices: [MASTG-BEST-0001, MASTG-BEST-0011]` in the test’s YAML front matter. The site generator will automatically create Mitigations links.
77+
- In body text: reference tests, tools, or techniques with @ (for example, @MASTG-TEST-0252, @MASTG-TOOL-0031).
78+
79+
### Style
80+
81+
- Follow the global Markdown rules and writing style (second person, active voice, concise, American spelling).
82+
- Use Chicago title case for titles.
83+
- Keep content focused and avoid duplicating other guide sections. Link out where appropriate.

0 commit comments

Comments
 (0)