Skip to content

Pull request review task

Add StrideAIReview@0 to the pipeline your branch policy runs for pull requests. It checks the lines each pull request adds for exposed secrets, risky code and floating package versions, reviews the change with your model, and comments on the pull request: one summary and one comment per finding on the line it is about. Each finding is commented once, however often the pipeline runs, and possible secrets can fail the check.

- task: StrideAIReview@0
inputs:
provider: azure
endpoint: https://contoso.openai.azure.com
model: gpt-4.1
apiKey: $(StrideAIKey)
instructions: |
We follow the Angular style guide. Flag any direct DOM access.
commentSeverity: medium
failOn: secrets
Input Default Meaning
aiReview true Also review the change with the model. Without a model, only the fixed rules run.
instructions What your team cares about, for example coding standards. Sent to the model with the change.
postComments true Post a summary and one comment per finding.
commentSeverity medium The lowest severity that gets its own comment. Possible secrets are always commented.
maxComments 10 Most comments per run.
failOn secrets Fail the check on: never, secrets, high, medium.
provider, endpoint, model, apiKey, apiVersion Shared model inputs.

Exposed secrets (keys, tokens, passwords, private keys), risky code (SQL built from strings, eval, HTML from code, shell commands, TLS checks turned off, weak hashes, open CORS, plain HTTP), and new packages with floating versions. Secrets are masked before anything is sent to the model or posted: only the first four characters and the length remain.

The build service needs Contribute to pull requests on the repository.