Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ls/editors/code/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ the following properties:
date string. The format string supports specifiers like `%Y` (year), `%m` (month), `%d` (day), `%H` (hour),
`%M` (minute), and `%S` (second). For example, for a date like `"2024-01-25"`, the format should be `"%Y-%m-%d"`.
For more information see: https://docs.rs/chrono/latest/chrono/format/strftime/index.html
* `regex` (string, optional): When `type` is `"string"`, this property specifies a regular expression that the
metadata value must match. Use `^` and `$` to require a full-value match. For example,
`"^(draft|reviewed|approved)$"` restricts the field to those values. Patterns use Rust's regex syntax.
For more information see: https://docs.rs/regex/latest/regex/

For accessing these settings go to the Settings

Expand Down
4 changes: 4 additions & 0 deletions ls/editors/code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@
"format": {
"type": "string",
"description": "The expected format of the date string (e.g., `%Y-%m-%d`)."
},
"regex": {
"type": "string",
"description": "A regular expression that string metadata values must match (e.g., ^(draft|reviewed|approved)$)."
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions playground/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Write, format and test YARA rules in the browser. Everything runs locally on Web
- go-to-definition
- formatting
- **Sample modes**: Text, Base64, Hex and local File
- **Match highlighting**: inline highlights in Text and Hex modes, with rule, pattern, and byte-range details on hover
- **Match highlighting**: click a match range in Summary to focus it in Text and Hex modes, with rule, pattern, and byte-range details on hover
- **Persistence**: rule source, sample drafts, and settings saved to Local Storage across refreshes
- **Metadata validation**: formatting and validation rules aligned with the [YARA VS Code extension](https://marketplace.visualstudio.com/items?itemName=VirusTotal.yara-x-ls) configuration
- **Scanner limits**: configurable maximum matches per pattern for noisy samples
Expand All @@ -26,10 +26,10 @@ Write, format and test YARA rules in the browser. Everything runs locally on Web

### Shortcuts

| Shortcut | Action |
| --- | --- |
| `Cmd/Ctrl + S` | Format the current YARA rule |
| `Cmd/Ctrl + Space` | Trigger autocompletion |
| Shortcut | Action |
| ------------------ | --------------------------------------- |
| `Cmd/Ctrl + S` | Format the current YARA rule |
| `Cmd/Ctrl + Space` | Trigger autocompletion |
| `Cmd/Ctrl + Enter` | Run the rule against the current sample |

### Sample Modes
Expand Down
53 changes: 7 additions & 46 deletions playground/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"dependencies": {
"@codingame/monaco-vscode-editor-api": "^25.1.2",
"@virustotal/yara-x": "1.15.0",
"@virustotal/yara-x": "^1.19.0",
"lit": "^3.3.2",
"monaco-languageclient": "^10.7.0",
"vscode-languageclient": "^9.0.1",
Expand All @@ -26,5 +26,8 @@
"rollup-plugin-visualizer": "^7.0.1",
"typescript": "~5.9.3",
"vite": "^7.3.6"
},
"overrides": {
"dompurify": "3.4.11"
}
}
Loading
Loading