-
Notifications
You must be signed in to change notification settings - Fork 181
Revert "chore: Revert updates to honor maintenance mode " #94
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -4,6 +4,11 @@ _Nicely done!_ :partying_face: | |||||
|
|
||||||
| You now have automated the process for Dependabot to alert you to vulnerabilities with your dependencies and to create pull requests to update them to secure versions! At this point, you only need to review the pull request and then merge it to stay on top of security problems with Dependencies. | ||||||
|
|
||||||
| > [!NOTE] | ||||||
| > Did you notice that there were several pull requests suggested by Dependabot? You only merged the one related to the **axios** dependency, but the others disappeared from the **Pull requests** panel. That's because the upgrade of the axios dependency triggered changes of other transitive dependencies, that might be either removed or updated to other versions. Whenever there is a change in your dependency graph, Dependabot will automatically review the existing pull requests and close the ones that are no longer relevant. So don't merge everything at once, let Dependabot do the job for you! | ||||||
| <img width="955" alt="Screenshot showing that the axios PR was merged and that the 2 others were closed" src="https://github.com/user-attachments/assets/6c97f90b-c6e2-4865-b1eb-dd7053383f07" /> | ||||||
|
|
||||||
|
|
||||||
| The security updates feature helps automate the process to resolve alerts, but what about just keeping up-to-date with version updates? We can also automate pull request generation for updated versions of dependencies using the Dependabot version updates feature. | ||||||
|
|
||||||
| **What are Dependabot version updates?**: In addition to security alerts, Dependabot can also take the effort out of maintaining your dependencies. You can use it to ensure that your repository automatically keeps up with the latest releases of the packages and applications it depends on. Similar to security alerts, Dependabot will identify an outdated dependency and create a pull request to update the manifest to the latest version of the dependency. | ||||||
|
|
@@ -12,16 +17,11 @@ Let's see how this works! | |||||
|
|
||||||
| ### :keyboard: Activity 4.1: Enable and trigger Dependabot version updates | ||||||
|
|
||||||
| 1. Navigate to the **Settings** tab and select **Code security and analysis**. | ||||||
| 1. Locate "Dependabot version updates" and click **Configure** to open a new file editor with pre-poplulated contents. The file is called `dependabot.yml`. | ||||||
| 1. Navigate to the **Settings** tab and select **Advanced Security**. | ||||||
| 1. Locate **Dependabot version updates** and click **Configure** to open a new file editor with pre-poplulated contents. The file is called `dependabot.yml`. | ||||||
|
||||||
| 1. Locate **Dependabot version updates** and click **Configure** to open a new file editor with pre-poplulated contents. The file is called `dependabot.yml`. | |
| 1. Locate **Dependabot version updates** and click **Configure** to open a new file editor with pre-populated contents. The file is called `dependabot.yml`. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| name: Step 0 # Start Exercise | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| permissions: | ||
| contents: write # Update Readme | ||
| actions: write # Disable/enable workflows | ||
| issues: write # Create issue and comment on issues | ||
|
|
||
| env: | ||
| STEP_1_FILE: ".github/steps/1-dependency-graph.md" | ||
|
|
||
| jobs: | ||
| disable_workflows: | ||
| name: Disable workflows | ||
| runs-on: ubuntu-latest | ||
|
|
||
|
Comment on lines
+17
to
+20
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Disable all workflows | ||
| run: | | ||
| workflows=$(git ls-files .github/workflows | grep -E '\.yml$|\.yaml$') | ||
| for workflow in $workflows; do | ||
| workflow_name=$(basename "$workflow") | ||
| gh workflow disable "$workflow_name" || true | ||
| done | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| start_exercise: | ||
| if: | | ||
| !github.event.repository.is_template | ||
| name: Start Exercise | ||
| uses: skills/exercise-toolkit/.github/workflows/start-exercise.yml@v0.6.0 | ||
| with: | ||
| exercise-title: "Secure your Repository's Supply Chain" | ||
| intro-message: "Let's explore how to secure your repository's supply chain, understand dependencies in your environment, and find vulnerabilities in those dependencies and patch them. 💻✨" | ||
|
|
||
| post_next_step_content: | ||
| name: Post next step content | ||
| runs-on: ubuntu-latest | ||
| needs: [start_exercise] | ||
| env: | ||
| ISSUE_URL: ${{ needs.start_exercise.outputs.issue-url }} | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Get response templates | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: skills/exercise-toolkit | ||
| path: exercise-toolkit | ||
| ref: v0.6.0 | ||
|
|
||
| - name: Build comment - add step content | ||
| id: build-comment | ||
| uses: skills/action-text-variables@v2 | ||
| with: | ||
| template-file: "${{ env.STEP_1_FILE }}" | ||
| template-vars: | | ||
| full_repo_name: "${{ github.repository }}" | ||
| - name: Create comment - add step content | ||
| run: | | ||
| gh issue comment "$ISSUE_URL" \ | ||
| --body "$ISSUE_BODY" | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| ISSUE_BODY: ${{ steps.build-comment.outputs.updated-text }} | ||
|
|
||
| - name: Create comment - watching for progress | ||
| run: | | ||
| gh issue comment "$ISSUE_URL" \ | ||
| --body-file exercise-toolkit/markdown-templates/step-feedback/watching-for-progress.md | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Disable current workflow and enable next one | ||
| run: | | ||
| gh workflow enable "Step 1" | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grammar: “to view the what Dependabot has found” should be “to view what Dependabot has found”.