mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 05:25:25 +00:00
feat(http): add skip-secret-file field (#5522)
* feat(http): add `BypassSecretFile` field Signed-off-by: Dwi Siswanto <git@dw1.io> * feat(http): conditionally apply auth strategies Signed-off-by: Dwi Siswanto <git@dw1.io> * refactor(http): rename `BypassSecretFile` field to `SkipSecretFile` Signed-off-by: Dwi Siswanto <git@dw1.io> --------- Signed-off-by: Dwi Siswanto <git@dw1.io>
This commit is contained in:
parent
1293a34707
commit
1af29f97a9
@ -147,6 +147,10 @@ type Request struct {
|
||||
// - "AWS"
|
||||
Signature SignatureTypeHolder `yaml:"signature,omitempty" json:"signature,omitempty" jsonschema:"title=signature is the http request signature method,description=Signature is the HTTP Request signature Method,enum=AWS"`
|
||||
|
||||
// description: |
|
||||
// SkipSecretFile skips the authentication or authorization configured in the secret file.
|
||||
SkipSecretFile bool `yaml:"skip-secret-file,omitempty" json:"skip-secret-file,omitempty" jsonschema:"title=bypass secret file,description=Skips the authentication or authorization configured in the secret file"`
|
||||
|
||||
// description: |
|
||||
// CookieReuse is an optional setting that enables cookie reuse for
|
||||
// all requests defined in raw section.
|
||||
|
||||
@ -689,7 +689,7 @@ func (request *Request) executeRequest(input *contextargs.Context, generatedRequ
|
||||
}
|
||||
|
||||
// === apply auth strategies ===
|
||||
if generatedRequest.request != nil {
|
||||
if generatedRequest.request != nil && !request.SkipSecretFile {
|
||||
generatedRequest.ApplyAuth(request.options.AuthProvider)
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user