GITHUB-ADVANCED-SECURITY practice question 9 of 15
– [Configure and Use Dependency Management] Which of the following workflow events would trigger a dependency review? (Each answer presents a complete solution. Choose two.)
Full set: 75 questionsThe dependency review feature in GitHub Advanced Security is implemented via the dependency-review-action. This action is primarily designed to run on the pullrequest event. This allows it to scan for dependency changes and vulnerabilities introduced in a pull request before they are merged into the main branch, displaying results directly in the pull request's "Files Changed" tab. The action can also be triggered manually using the workflowdispatch event. This provides the flexibility to run a dependency scan on-demand against any branch, outside of the standard pull request lifecycle, for auditing or specific security checks.
C. trigger is a generic term and not a valid event keyword used in the on: section of a GitHub Actions workflow file.
D. commit is not a valid event keyword for triggering a GitHub Actions workflow. The correct event for commits being pushed to a repository is push.
1. GitHub Docs, "Configuring dependency review": The official documentation provides an example workflow that explicitly uses on: pullrequest to trigger the dependency review action.
Reference: See the "Example workflow" section.
2. GitHub Docs, "Events that trigger workflows": This document lists all valid events for GitHub Actions. It confirms that pullrequest and workflowdispatch are valid events, while trigger and commit are not.
Reference: The list of events on the page.
URL: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows
3. GitHub Marketplace, "Dependency Review Action": The official page for the action states, "This action scans your pull requests for dependency changes and will fail if it finds any vulnerable dependencies." This highlights pullrequest as the primary trigger.
Reference: Main description paragraph.
URL: https://github.com/marketplace/actions/dependency-review
Keep practicing
Take the free GITHUB-ADVANCED-SECURITY practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other GITHUB-ADVANCED-SECURITY practice questions
- Question 1– [Use Code Scanning with CodeQL] When using CodeQL, what extension stores query suite de…
- Question 2– [Configure and Use Secret Scanning] What happens when you enable secret scanning on a p…
- Question 3– [Configure and Use Dependency Management] A dependency has a known vulnerability. What …
- Question 4– [Configure and Use Secret Scanning] What is a prerequisite to define a custom pattern f…
- Question 5– [Describe the GHAS Security Features and Functionality] What is a security policy?
- Question 6– [Configure GitHub Advanced Security Tools in GitHub Enterprise] What role is required t…
