|
| 1 | +# Contributing to Pretexta |
| 2 | + |
| 3 | +Thank you for your interest in contributing! We welcome YAML-based scenarios and quizzes that help improve security awareness training. |
| 4 | + |
| 5 | +## 🎯 What We're Looking For |
| 6 | + |
| 7 | +- **Realistic** social engineering scenarios |
| 8 | +- Coverage of all 6 Cialdini principles: |
| 9 | + - Authority |
| 10 | + - Scarcity |
| 11 | + - Reciprocity |
| 12 | + - Commitment & Consistency |
| 13 | + - Liking |
| 14 | + - Social Proof |
| 15 | +- Diverse attack vectors: email, phone, chat, web |
| 16 | +- Bilingual content (EN/ID preferred) |
| 17 | +- Well-documented decision trees |
| 18 | + |
| 19 | +## 📝 YAML Guidelines |
| 20 | + |
| 21 | +### File Naming |
| 22 | + |
| 23 | +``` |
| 24 | +YYYY-MM-DD-brief-description-slug.yaml |
| 25 | +``` |
| 26 | + |
| 27 | +Examples: |
| 28 | +- `2025-01-15-ceo-fraud-wire-transfer.yaml` |
| 29 | +- `2025-01-16-it-support-password-reset.yaml` |
| 30 | + |
| 31 | +### Challenge Template |
| 32 | + |
| 33 | +See `templates/challenge_template.yaml` |
| 34 | + |
| 35 | +```yaml |
| 36 | +type: challenge |
| 37 | +title: "Your Challenge Title" |
| 38 | +description: "Brief description for users" |
| 39 | +difficulty: easy|medium|hard |
| 40 | +cialdini_categories: [authority, scarcity] |
| 41 | +estimated_time: 10 # minutes |
| 42 | +metadata: |
| 43 | + author: "Your Name" |
| 44 | + license: "MIT" |
| 45 | + tags: [phishing, email, corporate] |
| 46 | + |
| 47 | +nodes: |
| 48 | + - id: start |
| 49 | + type: message |
| 50 | + channel: email_inbox |
| 51 | + content_en: |
| 52 | + subject: "Email subject" |
| 53 | + from: "sender@example.com" |
| 54 | + body: "Email body" |
| 55 | + content_id: # Optional Indonesian |
| 56 | + subject: "Subjek email" |
| 57 | + from: "pengirim@example.com" |
| 58 | + body: "Isi email" |
| 59 | + next: choice_1 |
| 60 | + |
| 61 | + - id: choice_1 |
| 62 | + type: question |
| 63 | + content_en: |
| 64 | + text: "What do you do?" |
| 65 | + options: |
| 66 | + - text: "Click the link" |
| 67 | + next: bad_outcome |
| 68 | + score_impact: -15 |
| 69 | + - text: "Verify first" |
| 70 | + next: good_outcome |
| 71 | + score_impact: +10 |
| 72 | + |
| 73 | + - id: bad_outcome |
| 74 | + type: end |
| 75 | + result: failure |
| 76 | + content_en: |
| 77 | + title: "Compromised!" |
| 78 | + explanation: "Clicking unverified links can lead to credential theft." |
| 79 | + |
| 80 | + - id: good_outcome |
| 81 | + type: end |
| 82 | + result: success |
| 83 | + content_en: |
| 84 | + title: "Well done!" |
| 85 | + explanation: "Always verify requests through known channels." |
| 86 | +``` |
| 87 | +
|
| 88 | +### Quiz Template |
| 89 | +
|
| 90 | +See `templates/quiz_template.yaml` |
| 91 | + |
| 92 | +```yaml |
| 93 | +type: quiz |
| 94 | +title: "Quiz Title" |
| 95 | +description: "Brief description" |
| 96 | +difficulty: easy|medium|hard |
| 97 | +cialdini_categories: |
| 98 | + - authority |
| 99 | +
|
| 100 | +metadata: |
| 101 | + author: "Pretexta" |
| 102 | + tags: [phishing, email, basics] |
| 103 | +
|
| 104 | +questions: |
| 105 | + - id: q1 |
| 106 | + content_en: |
| 107 | + text: "Question text?" |
| 108 | + explanation: "Why this answer matters" |
| 109 | + options: |
| 110 | + - text: "Option A" |
| 111 | + correct: true |
| 112 | + - text: "Option B" |
| 113 | + correct: false |
| 114 | + points: 10 |
| 115 | +``` |
| 116 | + |
| 117 | +## ✅ Validation |
| 118 | + |
| 119 | +Before submitting: |
| 120 | + |
| 121 | +```bash |
| 122 | +python bin/validate_yaml.py your_file.yaml |
| 123 | +``` |
| 124 | + |
| 125 | +## 🔄 Pull Request Process |
| 126 | + |
| 127 | +1. **Fork** the repository |
| 128 | +2. **Create** a branch: `git checkout -b add-scenario-name` |
| 129 | +3. **Add** your YAML to `data/sample/` |
| 130 | +4. **Validate** using the CLI tool |
| 131 | +5. **Commit**: `git commit -m "Add: CEO fraud scenario"` |
| 132 | +6. **Push**: `git push origin add-scenario-name` |
| 133 | +7. **Submit** a Pull Request |
| 134 | + |
| 135 | +### PR Guidelines |
| 136 | + |
| 137 | +- **One YAML per PR** (easier to review) |
| 138 | +- Include brief description of scenario |
| 139 | +- Test locally before submitting |
| 140 | +- Follow existing naming conventions |
| 141 | +- Add yourself to metadata author field |
| 142 | + |
| 143 | +## 🚫 What Not to Submit |
| 144 | + |
| 145 | +- Scenarios targeting real individuals or organizations |
| 146 | +- Content promoting illegal activities |
| 147 | +- Scenarios that could cause harm if misused |
| 148 | +- Malicious payloads or actual exploits |
| 149 | +- Low-quality or joke submissions |
| 150 | + |
| 151 | +## 📚 Resources |
| 152 | + |
| 153 | +- [Cialdini's 6 Principles](https://en.wikipedia.org/wiki/Robert_Cialdini#6_key_principles_of_influence_by_Robert_Cialdini) |
| 154 | +- [Social Engineering Attacks](https://www.social-engineer.org/framework/attack-vectors/) |
| 155 | +- [YAML Syntax](https://yaml.org/spec/1.2.2/) |
| 156 | + |
| 157 | +## 🤝 Code of Conduct |
| 158 | + |
| 159 | +- Be respectful and professional |
| 160 | +- Focus on security awareness education |
| 161 | +- No discrimination or harassment |
| 162 | +- Constructive feedback only |
| 163 | + |
| 164 | +## ❔ Questions? |
| 165 | + |
| 166 | +Open an issue or reach out to the maintainers. |
| 167 | + |
| 168 | +--- |
| 169 | + |
| 170 | +**Thank you for helping make security awareness training more effective!** |
0 commit comments