-
Notifications
You must be signed in to change notification settings - Fork 0
feat: shooter/sniper genre-specific checks MVP #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
d41ecfb
ci: add Sourcery AI config and SonarCloud scan to CI
zaferdace 2b00ebf
ci: address Sourcery review — use sonarcloud action, add build step
zaferdace 7e00222
feat: add shooter/sniper genre-specific checks and playtester presets
zaferdace e46a672
docs: add shooter genre documentation, examples, and test results
zaferdace 245fb97
refactor: address Sourcery review feedback on shooter genre checks
zaferdace 20e0829
fix: resolve CI failures — eslint unused vars and prettier formatting
zaferdace File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| reviews: | ||
| request_review: true | ||
| approve: false | ||
| auto_merge: false | ||
| ignore_paths: | ||
| - dist/** | ||
| - node_modules/** | ||
| - plugin/** | ||
| - "*.json" | ||
| - "*.md" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,107 @@ | ||
| # Shooter/Sniper Genre Checks | ||
|
|
||
| Genre-specific checks for Roblox shooter and sniper games. All checks are **opt-in** and **heuristic** — they use pattern matching and static analysis, not runtime simulation. | ||
|
|
||
| ## Shipcheck Rules | ||
|
|
||
| ### `rbx_shooter_weapon_remote_trust` | ||
|
|
||
| Audits weapon-related RemoteEvents and RemoteFunctions for server-side validation. | ||
|
|
||
| **What it checks:** | ||
| - Finds remotes with weapon-related names (fire, shoot, damage, hit, reload, equip, weapon, gun, bullet, projectile) | ||
| - Verifies each remote has a server-side handler in ServerScriptService | ||
| - Checks handlers for argument type validation (typeof, tonumber, assert, etc.) | ||
| - Checks handlers for rate limiting patterns (tick, cooldown, debounce, throttle) | ||
|
|
||
| **Issues raised:** | ||
|
|
||
| | Rule | Severity | Confidence | Description | | ||
| |------|----------|------------|-------------| | ||
| | `no_server_handler` | medium | medium | Weapon remote has no server-side handler | | ||
| | `missing_type_validation` | medium | heuristic | Handler lacks argument type checks | | ||
| | `no_rate_limiting` | low | heuristic | Handler lacks rate limiting patterns | | ||
|
|
||
| **Limitations:** | ||
| - Pattern-based name matching — non-standard naming may be missed | ||
| - Cannot verify validation is *correct*, only that patterns *exist* | ||
| - Obfuscated or minified scripts won't be analyzed effectively | ||
| - Only scans ServerScriptService for handlers | ||
|
|
||
| --- | ||
|
|
||
| ### `rbx_shooter_spawn_clustering` | ||
|
|
||
| Analyzes SpawnLocation distribution for fairness issues. | ||
|
|
||
| **What it checks:** | ||
| - Measures pairwise distances between all SpawnLocations | ||
| - Flags clustering when average spread is below threshold (default: 30 studs) | ||
| - Checks team balance — flags if team spawn counts differ by more than 2x | ||
| - Detects suspicious spawn heights (Y < -10 or Y > 1000) | ||
|
|
||
| **Issues raised:** | ||
|
|
||
| | Rule | Severity | Confidence | Description | | ||
| |------|----------|------------|-------------| | ||
| | `spawn_clustering` | warning | heuristic | Spawns are clustered below minimum spread | | ||
| | `team_spawn_imbalance` | warning | medium | Teams have unequal spawn point counts | | ||
| | `suspicious_spawn_height` | info | medium | Spawn at extreme Y position | | ||
|
|
||
| **Limitations:** | ||
| - Position-only heuristic — cannot assess line-of-sight or cover | ||
| - Intentionally clustered spawns (lobby areas) will be flagged | ||
| - FFA games without teams may trigger false positives on team balance | ||
|
|
||
| --- | ||
|
|
||
| ### `rbx_shooter_combat_content_maturity` | ||
|
|
||
| Scans scripts and UI text for combat-related content that may affect age rating. | ||
|
|
||
| **What it checks:** | ||
| - Reads all script source code and scans for keyword categories | ||
| - Scans TextLabel and TextButton text properties | ||
| - Categories: violence_explicit, violence_moderate, weapon_refs, social_risk | ||
|
|
||
| **Keyword categories:** | ||
|
|
||
| | Category | Examples | Severity | | ||
| |----------|----------|----------| | ||
| | violence_explicit | gore, dismember, decapitate, torture | warning | | ||
| | violence_moderate | blood, bleed, corpse, dead body | info | | ||
| | weapon_refs | AK-47, shotgun, sniper rifle, RPG | info | | ||
| | social_risk | discord.gg, youtube.com, twitter.com | warning | | ||
|
|
||
| **Limitations:** | ||
| - Keyword-based only — no semantic understanding | ||
| - Common game terms may be flagged (e.g., "headshot" is normal in shooters) | ||
| - All findings are `manual_review` confidence — flags for human review, not violations | ||
|
|
||
| ## Playtester Presets | ||
|
|
||
| ### `shooter_weapon_equip` | ||
|
|
||
| Verifies weapon Tools exist with proper configuration. | ||
|
|
||
| **Flow:** | ||
| 1. Check StarterPack for Tool instances | ||
| 2. Verify weapons have Handle parts | ||
| 3. Check for config values (Damage, Ammo, FireRate) | ||
| 4. Confirm at least one configured weapon exists | ||
|
|
||
| **Expected result:** PASS for shooter projects with value-instance weapon configs. PARTIAL or FAIL for non-shooter projects or script-based configs. | ||
|
|
||
| --- | ||
|
|
||
| ### `shooter_respawn_cycle` | ||
|
|
||
| Validates respawn infrastructure. | ||
|
|
||
| **Flow:** | ||
| 1. Check Players.CharacterAutoLoads and RespawnTime | ||
| 2. Count SpawnLocations and team assignments | ||
| 3. Search for CharacterAdded handlers in scripts | ||
| 4. Confirm spawn infrastructure exists | ||
|
|
||
| **Expected result:** PASS for most games with standard respawn setup. PARTIAL if CharacterAutoLoads is disabled (may be intentional for custom respawn). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| # Example: Shooter Audit Report | ||
|
|
||
| Sample output from running shooter-specific checks on a Roblox FPS project. | ||
|
|
||
| ## Shipcheck Report — MyShooterGame | ||
|
|
||
| **Date:** 2026-03-29T20:00:00Z | ||
| **Verdict:** REVIEW — Score: 72/100 | ||
|
|
||
| ### Summary | ||
| - Blockers: 0 | ||
| - Warnings: 3 | ||
| - Info: 1 | ||
| - Manual review needed: 2 | ||
|
|
||
| ### Shooter-Specific Findings | ||
|
|
||
| #### [shooter-weapon-001] Unvalidated weapon remote | ||
| **Confidence:** medium | **Category:** security | **Remediation:** assisted | ||
| Handler for "FireWeapon" in ServerScriptService.WeaponHandler may lack argument type checks. | ||
| **Evidence:** ServerScriptService.WeaponHandler — no typeof/tonumber patterns found | ||
| **Recommendation:** Validate argument types (typeof, tonumber, etc.) in OnServerEvent handlers. | ||
|
|
||
| #### [shooter-weapon-002] No rate limiting on damage remote | ||
| **Confidence:** heuristic | **Category:** security | **Remediation:** assisted | ||
| No rate limiting patterns detected for "ApplyDamage" handler. | ||
| **Evidence:** ServerScriptService.DamageHandler — no tick()/cooldown/debounce patterns | ||
| **Recommendation:** Add server-side rate limiting to prevent fire-rate exploitation. | ||
|
|
||
| #### [shooter-spawn-001] Spawn point clustering detected | ||
| **Confidence:** heuristic | **Category:** gameplay | **Remediation:** manual | ||
| Average spawn spread is 18.4 studs, below the 30-stud minimum. | ||
| **Evidence:** 8 SpawnLocations in Workspace.Spawns, avg distance: 18.4 studs | ||
| **Recommendation:** Spread spawn points to reduce spawn-kill risk. | ||
|
|
||
| #### [shooter-spawn-002] Team spawn imbalance | ||
| **Confidence:** medium | **Category:** gameplay | **Remediation:** manual | ||
| Team "Red" has 5 spawns, team "Blue" has 2 spawns. | ||
| **Evidence:** SpawnLocation TeamColor distribution | ||
| **Recommendation:** Balance spawn counts across teams. | ||
|
|
||
| ### Playtester Results | ||
|
|
||
| #### shooter_weapon_equip — PASS | ||
| - StarterPack: 3 Tools found (Rifle, Pistol, Knife) | ||
| - All weapons have Handle parts | ||
| - Config values: Rifle (Damage=25, Ammo=30), Pistol (Damage=15, Ammo=12) | ||
|
|
||
| #### shooter_respawn_cycle — PASS | ||
| - CharacterAutoLoads: true | ||
| - RespawnTime: 5 seconds | ||
| - SpawnLocations: 8 (Red: 5, Blue: 2, Neutral: 1) | ||
| - CharacterAdded handlers: 3 found | ||
|
|
||
| --- | ||
|
|
||
| *This is a sample report. Actual output depends on your project's structure and configuration.* | ||
| *All findings are heuristic — they flag review candidates, not definitive issues.* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.