Skip to content

Commit 4d9f984

Browse files
Added new detector for railwayApp
1 parent 10f5d79 commit 4d9f984

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

pkg/detectors/railwayapp/railwayapp.go

+4
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ func (s Scanner) Keywords() []string {
5050
return []string{"railwayapp", "railway"}
5151
}
5252

53+
func (s Scanner) Description() string {
54+
return "Railway is a deployment platform designed to streamline the software development life-cycle, starting with instant deployments and effortless scale, extending to CI/CD integrations and built-in observability."
55+
}
56+
5357
// FromData will find and optionally verify SaladCloud API Key secrets in a given set of bytes.
5458
func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (results []detectors.Result, err error) {
5559
dataStr := string(data)

pkg/detectors/railwayapp/railwayapp_test.go

+12-2
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@ func TestRailwayApp_FromChunk(t *testing.T) {
100100
}
101101
secret := testSecrets.MustGetField("RAILWAYAPP")
102102
inactiveSecret := testSecrets.MustGetField("RAILWAYAPP_INACTIVE")
103-
//secret := "76c3174a-e01f-4827-8339-ac1d64c7dfd6"
104-
//inactiveSecret := "5145d834-74ff-40ce-82b6-29ff5d976fb4"
105103

106104
type args struct {
107105
ctx context.Context
@@ -128,6 +126,9 @@ func TestRailwayApp_FromChunk(t *testing.T) {
128126
{
129127
DetectorType: detectorspb.DetectorType_RailwayApp,
130128
Verified: true,
129+
ExtraData: map[string]string{
130+
"rotation_guide": "https://howtorotate.com/docs/tutorials/railwayapp/",
131+
},
131132
},
132133
},
133134
wantErr: false,
@@ -145,6 +146,9 @@ func TestRailwayApp_FromChunk(t *testing.T) {
145146
{
146147
DetectorType: detectorspb.DetectorType_RailwayApp,
147148
Verified: false,
149+
ExtraData: map[string]string{
150+
"rotation_guide": "https://howtorotate.com/docs/tutorials/railwayapp/",
151+
},
148152
},
149153
},
150154
wantErr: false,
@@ -174,6 +178,9 @@ func TestRailwayApp_FromChunk(t *testing.T) {
174178
{
175179
DetectorType: detectorspb.DetectorType_RailwayApp,
176180
Verified: false,
181+
ExtraData: map[string]string{
182+
"rotation_guide": "https://howtorotate.com/docs/tutorials/railwayapp/",
183+
},
177184
},
178185
},
179186
wantErr: false,
@@ -191,6 +198,9 @@ func TestRailwayApp_FromChunk(t *testing.T) {
191198
{
192199
DetectorType: detectorspb.DetectorType_RailwayApp,
193200
Verified: false,
201+
ExtraData: map[string]string{
202+
"rotation_guide": "https://howtorotate.com/docs/tutorials/railwayapp/",
203+
},
194204
},
195205
},
196206
wantErr: false,

0 commit comments

Comments
 (0)