semgrep adds alpha Objective-C parsing
Introduced 2026-10-20 · score 0.96
HOW TO USE IT
For Objective-C `.m` code, define Semgrep rules with `languages: [objc]` and Semgrep pattern syntax, then scan with `semgrep scan`. v1.182.0 added alpha support for search-mode and taint-mode rules; Objective-C++ `.mm` is not included.
semgrep scan --config <rules.yml> <path-to-m-or-project>rules:
- id: objc-pattern-search
languages: [objc]
message: <finding message>
severity: WARNING
pattern: <Objective-C pattern>rules:
- id: objc-taint-flow
languages: [objc]
message: <finding message>
severity: WARNING
mode: taint
pattern-sources:
- pattern: <source pattern>
pattern-sinks:
- pattern: <sink pattern>WHY THIS HELPS
When searching or applying taint-mode rules to Objective-C `.m` files, use Semgrep’s Objective-C language support.
REQUIREMENTS AND LIMITATIONS
- Version: 1.182.0
- Availability: alpha
- languages (required): Rule language selector; set to `objc` for Objective-C.
- mode: Set to `taint` for taint analysis; search mode is the default.
- pattern (required): Search-mode code pattern to match.
- pattern-sources (required): Taint-mode source patterns that mark data as tainted.
- pattern-sinks (required): Taint-mode sink patterns where tainted data is reported.
- --config <rules.yml> (required): CLI option selecting a YAML rule configuration file.
- <path-to-m-or-project>: Target file or folder; omitted targets default to the current working directory.
- Prerequisite: Objective-C parsing is alpha support added in Semgrep v1.182.0; `.m` files are supported.
- Prerequisite: No additional authentication requirement for local `semgrep scan` with specific rules is stated in the CLI reference.
- Objective-C++ (`.mm`) support will follow separately.
- Remaining constructs parse and degrade gracefully.
FIRST-PARTY EVIDENCE
- https://github.com/semgrep/semgrep/releases/tag/v1.182.0
- https://semgrep.dev/docs/cli-reference
- https://semgrep.dev/docs/writing-rules/rule-syntax
Check the installed version and the source before using it. Entry JSON