Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check matcher status for cluster template execution #4132

Merged
merged 1 commit into from
Sep 11, 2023

Conversation

ShubhamRasal
Copy link
Contributor

@ShubhamRasal ShubhamRasal commented Sep 7, 2023

closes #4130

we are checking the matcherStatus for normal execution before failure

if !results.Load() && matcherStatus {

but not checking when clustered template execution, so updated it

@ShubhamRasal
Copy link
Contributor Author

ShubhamRasal commented Sep 7, 2023

other way it to update the mockOutputWriter like the standardOutputWriter to initlaize by options

// MockOutputWriter is a mocked output writer.
type MockOutputWriter struct {
	aurora          aurora.Aurora
        matcherStatus bool
	RequestCallback func(templateID, url, requestType string, err error)
	WriteCallback   func(o *output.ResultEvent)
}

// NewMockOutputWriter creates a new mock output writer
func NewMockOutputWriter(o Options) *MockOutputWriter {
	return &MockOutputWriter{aurora: aurora.NewAurora(false),
	             matcherStatus: o.MatcherStatus
	}
}

// WriteFailure writes the event to file and/or screen.
func (m *MockOutputWriter) WriteFailure(wrappedEvent *output.InternalWrappedEvent) error {
	 if !m.matcherStatus {
		return nil
	}
}

but this will lead to everyone to update sdk code whenever they switch to new latest version.
so ingnoring this.

@Mzack9999 Mzack9999 added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Sep 11, 2023
@ehsandeep ehsandeep merged commit eebc445 into dev Sep 11, 2023
12 checks passed
@ehsandeep ehsandeep deleted the issue-4130-ms-not-working-with-cluster-templates branch September 11, 2023 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nuclei v2.9.14 library usage report false positives findings
3 participants