data:[]byte(fmt.Sprintf("You can find a gemini %s and secretMaster %s within",keyMaster,secretMaster)),
verify:true,
},
want:[]detectors.Result{
{
DetectorType:detectorspb.DetectorType_Gemini,
Verified:true,
},
},
wantErr:false,
},
{
name:"found, verified; account",
s:Scanner{},
args:args{
ctx:context.Background(),
data:[]byte(fmt.Sprintf("You can find a gemini %s and secretAccount %s within",keyAccount,secretAccount)),
verify:true,
},
want:[]detectors.Result{
{
DetectorType:detectorspb.DetectorType_Gemini,
Verified:true,
},
},
wantErr:false,
},
{
name:"found, unverified",
s:Scanner{},
args:args{
ctx:context.Background(),
data:[]byte(fmt.Sprintf("You can find a gemini secretMaster %s and secretMaster %s within but not valid",keyMaster,inactiveSecret)),// the secretMaster would satisfy the regex but not pass validation
verify:true,
},
want:[]detectors.Result{
{
DetectorType:detectorspb.DetectorType_Gemini,
Verified:false,
},
},
wantErr:false,
},
{
name:"not found",
s:Scanner{},
args:args{
ctx:context.Background(),
data:[]byte("You cannot find the secretMaster within"),