trapline 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/trapline/version.rb +1 -1
- metadata +8 -48
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 923927b9c60e9abe2567a2a3649d873526b32ee956eda62fab9898cf1a173876
|
|
4
|
+
data.tar.gz: 136f0a486712afe94db49ec9619b50a2a5750895cf177da514f4bd05a908c61d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0fc33e3d7d2dae276736bdb95ce7d8a5883f11602649cfcbf80eda2c39a0dd123711bb9243b5372f06ae28ab7a62e10e8a2f462c8be3307bb840bc26e3aaf169
|
|
7
|
+
data.tar.gz: b82a6661545d4abefe9103c57fbf5e9061504747f19444fed9a7bcf632032044fdbbd4162194295fef477d9cab5bf495328ac22850f305ea1cd0b39dff5e4cf4
|
data/README.md
CHANGED
data/lib/trapline/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: trapline
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jose Augusto
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: minitest
|
|
@@ -45,52 +45,10 @@ dependencies:
|
|
|
45
45
|
- !ruby/object:Gem::Version
|
|
46
46
|
version: '13.0'
|
|
47
47
|
description: |
|
|
48
|
-
Trapline is a web editor and CLI for writing and testing opengrep/semgrep
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
INSTALL
|
|
53
|
-
|
|
54
|
-
gem install trapline
|
|
55
|
-
|
|
56
|
-
Trapline needs an engine on your PATH, opengrep (recommended) or semgrep:
|
|
57
|
-
|
|
58
|
-
curl -fsSL https://raw.githubusercontent.com/opengrep/opengrep/main/install.sh | bash
|
|
59
|
-
pip install semgrep
|
|
60
|
-
|
|
61
|
-
The opengrep installer puts the binary in ~/.opengrep/cli/latest/. Add it to
|
|
62
|
-
your PATH or pass --engine-bin. Check the setup with:
|
|
63
|
-
|
|
64
|
-
trapline version
|
|
65
|
-
|
|
66
|
-
USAGE
|
|
67
|
-
|
|
68
|
-
Web editor (http://127.0.0.1:9292):
|
|
69
|
-
|
|
70
|
-
trapline server -r ./rules
|
|
71
|
-
|
|
72
|
-
Write the rule, paste vulnerable and fixed code, and click the margin to mark
|
|
73
|
-
the lines that must or must not match. Trapline writes the ruleid/ok
|
|
74
|
-
annotations and reruns as you type.
|
|
75
|
-
|
|
76
|
-
Rule drafts from a CVE or GHSA (looked up in NVD and OSV):
|
|
77
|
-
|
|
78
|
-
trapline cve CVE-2024-4577 # list the drafts
|
|
79
|
-
trapline cve CVE-2024-4577 --save --pick 2 -r ./rules
|
|
80
|
-
|
|
81
|
-
Validate and test rules (exits 1 on failure, for CI):
|
|
82
|
-
|
|
83
|
-
trapline validate --engine rules/*.yaml
|
|
84
|
-
trapline test -r ./rules
|
|
85
|
-
trapline run rules/my-rule.yaml app/models/user.rb
|
|
86
|
-
|
|
87
|
-
Rails: add gem "trapline" to the Gemfile, then
|
|
88
|
-
|
|
89
|
-
bin/rails generate trapline:install # editor at /trapline
|
|
90
|
-
bin/rails trapline:test
|
|
91
|
-
|
|
92
|
-
It also runs as a Rack app (run Trapline::Web::App.new in config.ru). No
|
|
93
|
-
runtime dependencies besides Ruby 3.3+ and the engine binary.
|
|
48
|
+
Trapline is a web editor and CLI for writing and testing opengrep/semgrep rules,
|
|
49
|
+
plus a generator that turns a CVE into rule drafts with test code. It runs
|
|
50
|
+
standalone, as a Rack app or mounted in Rails. See the README for installation
|
|
51
|
+
and usage: https://github.com/JAugusto42/trapline#readme
|
|
94
52
|
email:
|
|
95
53
|
- joseaugusto.881@outlook.com
|
|
96
54
|
executables:
|
|
@@ -153,6 +111,8 @@ licenses:
|
|
|
153
111
|
metadata:
|
|
154
112
|
source_code_uri: https://github.com/JAugusto42/trapline
|
|
155
113
|
bug_tracker_uri: https://github.com/JAugusto42/trapline/issues
|
|
114
|
+
documentation_uri: https://github.com/JAugusto42/trapline#readme
|
|
115
|
+
changelog_uri: https://github.com/JAugusto42/trapline/releases
|
|
156
116
|
rubygems_mfa_required: 'true'
|
|
157
117
|
post_install_message:
|
|
158
118
|
rdoc_options: []
|