Skip to content

Commit dda590b

Browse files
authored
Merge branch 'main' into dependabot/npm_and_yarn/npm-security-bec2176354
2 parents 1be3789 + 6531b37 commit dda590b

7 files changed

Lines changed: 47 additions & 11 deletions

File tree

.github/workflows/deploy-merged-pr.yml

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,38 @@ permissions:
1111
actions: read
1212

1313
jobs:
14+
check-file-changes:
15+
if: github.event.review.state == 'approved'
16+
runs-on: ubuntu-latest
17+
env:
18+
PR_NUMBER: ${{ github.event.pull_request.number }}
19+
SOURCE_REPO: ${{ github.repository }}
20+
outputs:
21+
should_sync: ${{ steps.filter.outputs.should_sync }}
22+
steps:
23+
- name: Check Changed File Paths
24+
id: filter
25+
env:
26+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
run: |
28+
EXCLUDED_PATHS=(
29+
".github/workflows/"
30+
)
31+
32+
CHANGED_FILES=$(gh pr view $PR_NUMBER --json files --repo $SOURCE_REPO --jq '[.files[].path]')
33+
34+
EXCLUDE_FILTER=$(printf '"%s",' "${EXCLUDED_PATHS[@]}")
35+
EXCLUDE_FILTER="[${EXCLUDE_FILTER%,}]"
36+
37+
NON_WORKFLOW_CHANGES=$(echo "$CHANGED_FILES" | jq --argjson exclude "$EXCLUDE_FILTER" '[.[] | select(. as $f | $exclude | any(. as $p | $f | startswith($p)) | not)] | length')
38+
if [ "$NON_WORKFLOW_CHANGES" -gt 0 ]; then
39+
echo "PR contains changes outside filtered paths — proceeding."
40+
echo "should_sync=true" >> $GITHUB_OUTPUT
41+
else
42+
echo "All changes are under filtered paths — skipping workflow."
43+
echo "should_sync=false" >> $GITHUB_OUTPUT
44+
fi
45+
1446
check-merge-state:
1547
if: github.event.review.state == 'approved'
1648
runs-on: ubuntu-latest
@@ -95,8 +127,8 @@ jobs:
95127
echo "Auto-merge enabled successfully!"
96128
97129
dispatch-to-internal:
98-
needs: check-merge-state
99-
if: needs.check-merge-state.outputs.checks_passed == 'true' && github.event.review.state == 'approved'
130+
needs: [check-file-changes, check-merge-state]
131+
if: needs.check-merge-state.outputs.checks_passed == 'true' && needs.check-file-changes.outputs.should_sync == 'true' && github.event.review.state == 'approved'
100132
runs-on: ubuntu-latest
101133
env:
102134
SOURCE_REPO: github/github-well-architected

.github/workflows/pr-check.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ env:
1515
CI: development
1616
SITE_DIR: public
1717
HUGO_VERSION: 0.151.0
18+
DART_SASS_VERSION: 1.99.0
1819

1920
jobs:
2021
lint:
@@ -67,7 +68,7 @@ jobs:
6768
fetch-depth: 0
6869

6970
- name: Dependency Review
70-
uses: actions/dependency-review-action@v4
71+
uses: actions/dependency-review-action@v5
7172
with:
7273
config-file: >-
7374
./.github/dependency-review-config.yml
@@ -77,13 +78,16 @@ jobs:
7778
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb
7879
sudo dpkg -i ${{ runner.temp }}/hugo.deb
7980
hugo version
80-
- name: Install Dart Sass
81-
run: sudo snap install dart-sass
8281
8382
- uses: actions/setup-node@v6
8483
with:
8584
node-version: lts/*
8685

86+
- name: Install Dart Sass
87+
run: |
88+
npm install -g sass@${DART_SASS_VERSION}
89+
sass --version
90+
8791
- name: Install test dependencies
8892
run: |
8993
# Clean install of the node modules
@@ -129,7 +133,7 @@ jobs:
129133
done
130134
131135
- name: Upload Pages artifact
132-
uses: actions/upload-pages-artifact@v4
136+
uses: actions/upload-pages-artifact@v5
133137
with:
134138
path: './${{ env.SITE_DIR }}'
135139
retention-days: '7'

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ See [Framework Overview] for details on each pillar.
411411
- Keep sentences **short and clear**
412412
- Avoid unnecessary jargon
413413
- Include practical examples
414-
- Prefer GitHub Docs links to **Enterprise Cloud**: `https://docs.github.com/en/enterprise-cloud@latest` (unless the guidance is specific to GitHub Enterprise Server)
414+
- Prefer GitHub Docs links to **Enterprise Cloud**: `https://docs.github.com/enterprise-cloud@latest` (unless the guidance is specific to GitHub Enterprise Server)
415415
- Use Hugo shortcodes to keep articles consistent (see `archetypes/default.md`):
416416
- Further assistance: `{{% seeking-further-assistance-details %}}`
417417
- Related links: `{{% related-links-github-docs %}}`

content/library/application-security/recommendations/securing-developer-workspace.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ In addition to the development container best practices above, Codespaces enviro
142142

143143
Third-party dependencies can introduce vulnerabilities into the development environment and the software supply chain. In fact, they are a leading cause of security incidents. It is essential to manage these dependencies carefully to minimize risk. This means reviewing and securing dependencies coming from package managers (like npm, PyPI, Maven, and NuGet), registries (which provide OCI images, Helm charts, and dev container features), OS-level packages (like apt, yum, and apk), and other sources.
144144

145-
- **Keep dependencies up to date**. Regularly update third-party libraries and packages to incorporate security patches and improvements. Use dependency management tools, such as [Dependabot](https://docs.github.com/en/enterprise-cloud@latest/dependabot), to automatically check for updates and vulnerabilities. When a new version is released, review the changelog for security-related fixes before updating. Prefer manual updates over automatic updates to ensure that changes are reviewed. Avoid mutable references.
145+
- **Keep dependencies up to date**. Regularly update third-party libraries and packages to incorporate security patches and improvements. Use dependency management tools, such as [Dependabot](https://docs.github.com/en/enterprise-cloud@latest/code-security/getting-started/dependabot-quickstart-guide), to automatically check for updates and vulnerabilities. When a new version is released, review the changelog for security-related fixes before updating. Prefer manual updates over automatic updates to ensure that changes are reviewed. Avoid mutable references.
146146
- **Eliminate insecure packages**. Remove or replace packages that are no longer maintained or have known security issues. Vulnerabilities on developer machines can provide access to corporate networks, source code, and other sensitive resources. Use tools like Dependabot to identify and remediate vulnerable and outdated dependencies. Remember that multiple low- and medium-severity vulnerabilities will create a larger attack surface, creating new high- and critical-severity vulnerabilities; avoid accumulating these over time.
147147
- **Review all dependencies**. Before adding a new dependency, review its source code, documentation, and community reputation. Look for signs of active maintenance. Avoid packages with excessive permissions or those that execute code during installation without explicit user consent. Continuously review existing dependencies for security risks and remove any that are unnecessary.
148148
- **Restrict automatic code execution during package installation**. Configure package managers to block or prompt for confirmation before executing scripts during dependency installation. This prevents malicious code from running without developer awareness. For example, configure `ignore-scripts=true` in an `.npmrc` file to prevent `npm` from running lifecycle scripts by default. Placing this configuration in the project ensures that this setting applies to everyone that works with the code. In addition, creating this file at the user level (`$HOME/.npmrc` or `%USERPROFILE%\.npmrc`) ensures that you do not automatically run scripts when you restore a project that lacks this configuration. An easy way to apply user-level personalization is to use a [dotfiles](https://dotfiles.github.io/) repository to configure your development machine, [local dev containers](https://code.visualstudio.com/docs/devcontainers/containers#_personalizing-with-dotfile-repositories), or [Codespaces](https://docs.github.com/en/codespaces/setting-your-user-preferences/personalizing-github-codespaces-for-your-account#dotfiles). This ensures that your preferred settings are automatically and consistently applied to each development environment.

content/library/governance/recommendations/managing-repositories-at-scale/rulesets-best-practices.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Enterprises need consistent, enforceable guardrails for how code enters, evolves
109109
- Grant bypass only to roles/teams with clear break-glass standard operating procedures.
110110
- Monitor bypass exceptions via the audit log, [REST API](https://docs.github.com/enterprise-cloud@latest/rest/repos/bypass-requests), webhooks, or the native [rule insights](https://docs.github.com/enterprise-cloud@latest/organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization#viewing-insights-for-rulesets) dashboard; look for patterns indicating a need to adjust rules.
111111
6. Change management & versioning
112-
- [Rulesest history](https://docs.github.com/enterprise-cloud@latest/organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization#using-ruleset-history) is retained for 180 days; you can view all the changes to a ruleset and revert back to a specific iteration.
112+
- [Rulesets history](https://docs.github.com/enterprise-cloud@latest/organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization#using-ruleset-history) is retained for 180 days; you can view all the changes to a ruleset and revert back to a specific iteration.
113113
7. Measurement & feedback
114114
- Metrics: % repos covered per tier, # blocked events by rule, mean time to remediate violation patterns, bypass frequency.
115115
- Use rule insights to adjust high-friction rules.

content/library/productivity/quick-links.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# SPDX-License-Identifier: MIT
44
title: Quick Links
55
weight: 1
6-
prev: library/productivity/introduction
6+
prev: library/productivity
77
next: library/productivity/design-principles
88
---
99

content/library/scenarios/nist-ssdf-implementation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ jobs:
845845
1. **Security alerts**: Review and triage alerts in the Security tab
846846
2. **Dependabot security updates**: Automatically generate PRs for dependency updates
847847
3. **Repository custom properties**: Use [custom properties](https://docs.github.com/enterprise-cloud@latest/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization) to classify repositories by business criticality, enabling risk-based prioritization of alerts
848-
4. **Security campaigns**: Use [security campaigns](https://docs.github.com/enterprise-cloud@latest/code-security/securing-your-organization/tracking-security-work-across-your-organization/about-security-campaigns) to prioritize and coordinate remediation of specific alert types across repositories
848+
4. **Security campaigns**: Use [security campaigns](https://docs.github.com/enterprise-cloud@latest/code-security/securing-your-organization/fixing-security-alerts-at-scale) to prioritize and coordinate remediation of specific alert types across repositories
849849
5. **Copilot Autofix**: Use [Copilot Autofix](https://docs.github.com/enterprise-cloud@latest/code-security/code-scanning/managing-code-scanning-alerts/about-autofix-for-codeql-code-scanning) to automatically generate fix suggestions for vulnerabilities identified by CodeQL
850850

851851
{{< callout type="info" >}}

0 commit comments

Comments
 (0)