Skip to content

Commit 4828454

Browse files
authored
repo sync
2 parents 1588f50 + accd4f7 commit 4828454

File tree

9 files changed

+103
-6
lines changed

9 files changed

+103
-6
lines changed

.github/workflows/repo-sync-stalls.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Repo Sync Stalls
22
on:
33
workflow_dispatch:
44
schedule:
5-
- cron: '*/30 * * * *'
5+
- cron: '0 */2 * * *'
66
jobs:
77
check-freezer:
88
name: Check for deployment freezes

content/actions/learn-github-actions/security-hardening-for-github-actions.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ This means that a compromise of a single action within a workflow can be very si
5454
**Warning:** The short version of the commit SHA is insecure and should never be used for specifying an action's Git reference. Because of how repository networks work, any user can fork the repository and push a crafted commit to it that collides with the short SHA. This causes subsequent clones at that SHA to fail because it becomes an ambiguous commit. As a result, any workflows that use the shortened SHA will immediately fail.
5555

5656
{% endwarning %}
57+
58+
5759
* **Audit the source code of the action**
5860

5961
Ensure that the action is handling the content of your repository and secrets as expected. For example, check that secrets are not sent to unintended hosts, or are not inadvertently logged.
@@ -92,10 +94,14 @@ This list describes the recommended approaches for accessing repository data wit
9294

9395
As a result, self-hosted runners should almost [never be used for public repositories](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories) on {% data variables.product.product_name %}, because any user can open pull requests against the repository and compromise the environment. Similarly, be cautious when using self-hosted runners on private repositories, as anyone who can fork the repository and open a PR (generally those with read-access to the repository) are able to compromise the self-hosted runner environment, including gaining access to secrets and the more privileged `GITHUB_TOKEN` which grants write-access permissions on the repository.
9496

97+
When a self-hosted runner is defined at the organization or enterprise level, {% data variables.product.product_name %} can schedule workflows from multiple repositories onto the same runner. Consequently, a security compromise of these environments can result in a wide impact. To help reduce the scope of a compromise, you can create boundaries by organizing your self-hosted runners into separate groups. For more information, see "[Managing access to self-hosted runners using groups](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups)."
98+
9599
You should also consider the environment of the self-hosted runner machines:
96100
- What sensitive information resides on the machine configured as a self-hosted runner? For example, private SSH keys, API access tokens, among others.
97101
- Does the machine have network access to sensitive services? For example, Azure or AWS metadata services. The amount of sensitive information in this environment should be kept to a minimum, and you should always be mindful that any user capable of invoking workflows has access to this environment.
98102

103+
Some customers might attempt to partially mitigate these risks by implementing systems that automatically destroy the self-hosted runner after each job execution. However, this approach might not be as effective as intended, as there is no way to guarantee that a self-hosted runner only runs one job.
104+
99105
### Auditing {% data variables.product.prodname_actions %} events
100106

101107
You can use the audit log to monitor administrative tasks in an organization. The audit log records the type of action, when it was run, and which user account performed the action.
@@ -132,5 +138,3 @@ The following tables describe the {% data variables.product.prodname_actions %}
132138
| `action:org.runner_group_renamed` | Triggered when an organization admin renames a self-hosted runner group.
133139
| `action:org.runner_group_runners_added` | Triggered when an organization admin [adds a self-hosted runner to a group](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#moving-a-self-hosted-runner-to-a-group).
134140
| `action:org.runner_group_runners_removed` | Triggered when an organization admin removes a self-hosted runner from a group.
135-
136-

data/ui.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,14 @@ contribution_cta:
6666
button: Make a contribution
6767
or: Or,
6868
to_guidelines: learn how to contribute.
69+
enterprise_releases_list:
70+
title: Enterprise Server Releases
71+
currently_supported: Currently supported
72+
currently_supported_message: See <a href="https://github.com/enterprise">GitHub Enterprise</a> for information about the latest release.
73+
deprecated: Deprecated
74+
deprecated_message: 'These docs remain available but are no longer maintained:'
75+
deprecated_developer: Deprecated on developer.github.com
76+
deprecated_developer_message: 'These docs remain available on the legacy <a href="https://developer.github.com">developer site</a> but are no longer maintained:'
6977
products:
7078
graphql:
7179
reference:

includes/article-version-switcher.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% if page.permalinks and page.permalinks.length > 1 %}
2-
<details class="dropdown-withArrow d-inline-block details details-reset mb-4 position-relative close-when-clicked-outside article-versions">
2+
<details class="dropdown-withArrow d-inline-block details details-reset mb-1 position-relative close-when-clicked-outside article-versions">
33
<summary class="d-flex flex-items-center flex-justify-between f4 h5-mktg btn-outline-mktg btn-mktg p-2">
44
<!-- GitHub.com, Enterprise Server 2.16, etc -->
55
<span class="d-md-none d-xl-inline-block mr-1">{% data ui.pages.article_version %}</span> {{ allVersions[currentVersion].versionTitle }}
@@ -14,6 +14,7 @@
1414
>
1515
{{ allVersions[permalink.pageVersion].versionTitle }}</a>
1616
{% endfor %}
17+
<a class="f6 no-underline text-gray-light pt-1" href="/enterprise-server-releases">See all Enterprise releases</a>
1718
</div>
1819
</details>
1920
{% endif %}

includes/head.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<head>
22
<meta charset="utf-8" />
3-
<title>{% if error == '404' %}{% data ui.errors.oops %}{% elsif currentVersion == 'homepage' %}GitHub Documentation{% else %}{{ page.fullTitle }}{% endif %}</title>
3+
<title>{% if error == '404' %}{% data ui.errors.oops %}{% elsif currentVersion == 'homepage' %}GitHub Documentation{% elsif page.fullTitle %}{{ page.fullTitle }}{% else %}GitHub Documentation{% endif %}</title>
44
<meta name="viewport" content="width=device-width, initial-scale=1">{% if page.hidden %}
55
<meta name="robots" content="noindex" />{% endif %}
66
<meta name="google-site-verification" content="OgdQc0GZfjDI52wDv1bkMT-SLpBUo_h5nn9mI9L22xQ" />
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<!doctype html>
2+
<html lang="{{currentLanguage}}">
3+
{% include head %}
4+
5+
<body class="d-lg-flex">
6+
{% include sidebar %}
7+
8+
<main class="width-full">
9+
<main class="container-xl px-3 px-md-6 my-4 my-lg-4 d-xl-flex">
10+
<article class="markdown-body width-full">
11+
<div class="d-lg-flex flex-justify-between"></div>
12+
13+
<div class="mt-2 article-grid-container">
14+
15+
<div class="article-grid-head">
16+
<div class="d-flex flex-items-baseline flex-justify-between mt-3">
17+
<h1 class="border-bottom-0">{% data ui.enterprise_releases_list.title %}</h1>
18+
</div>
19+
</div>
20+
<div class="article-grid-toc border-bottom border-xl-0 pb-4 mb-5 pb-xl-0 mb-xl-0">
21+
<div class="article-grid-toc-content">
22+
{% if miniTocItems.size > 1 %}
23+
<h3 id="in-this-article" class="f5 mb-2"><a class="link-gray-dark" href="#in-this-article">{% data ui.pages.miniToc %}</a></h3>
24+
<ul class="list-style-none pl-0 f5 mb-0">
25+
{% for item in miniTocItems %}
26+
<li class="ml-{{ item.indentationLevel | times: 3 }} mb-2 lh-condensed">{{ item.contents }}</li>
27+
{% endfor %}
28+
</ul>
29+
{% endif %}
30+
</div>
31+
</div>
32+
<div id="article-contents" class="article-grid-body">
33+
<h2 id="currently-supported"><a href="#currently-supported">{% data ui.enterprise_releases_list.currently_supported %}</a></h2>
34+
<p>{% data ui.enterprise_releases_list.currently_supported_message %}</p>
35+
<ul>
36+
{% for version in enterpriseServerReleases.supported %}
37+
<li><a href="/{{currentLanguage}}/enterprise-server@{{version}}">Enterprise Server {{version}}</a></li>
38+
{% endfor %}
39+
</ul>
40+
<h2 id="deprecated"><a href="#deprecated">{% data ui.enterprise_releases_list.deprecated %}</a></h2>
41+
<p>{% data ui.enterprise_releases_list.deprecated_message %}</p>
42+
<ul>
43+
{% for version in enterpriseServerReleases.deprecatedReleasesWithNewFormat %}
44+
<li><a href="/{{currentLanguage}}/enterprise-server@{{version}}">Enterprise Server {{version}}</a></li>
45+
{% endfor %}
46+
{% for version in enterpriseServerReleases.deprecatedReleasesWithLegacyFormat %}
47+
<li><a href="/{{currentLanguage}}/enterprise/{{version}}">Enterprise Server {{version}}</a></li>
48+
{% endfor %}
49+
</ul>
50+
<h2 id="deprecated-on-developer.github.com"><a href="#deprecated-on-developer.github.com">{% data ui.enterprise_releases_list.deprecated_developer %}</a></h2>
51+
<p>{% data ui.enterprise_releases_list.deprecated_developer_message %}</p>
52+
{% for version in enterpriseServerReleases.deprecatedReleasesOnDeveloperSite %}
53+
<li><a href="https://developer.github.com/enterprise/{{version}}">Enterprise Server {{version}}</a></li>
54+
{% endfor %}
55+
{% include support %}
56+
{% include small-footer %}
57+
</div>
58+
</div>
59+
</article>
60+
</main>
61+
62+
</main>
63+
</body>
64+
</html>

lib/enterprise-server-releases.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ const lastVersionWithoutStubbedRedirectFiles = '2.17'
4444
// last version using paths like /enterprise/<release>/<user>/<product>/<category>/<article>
4545
// instead of /enterprise-server@<release>/<product>/<category>/<article>
4646
const lastReleaseWithLegacyFormat = '2.18'
47+
const deprecatedReleasesWithLegacyFormat = deprecated.filter(version => versionSatisfiesRange(version, '<=2.18'))
48+
const deprecatedReleasesWithNewFormat = deprecated.filter(version => versionSatisfiesRange(version, '>2.18'))
49+
const deprecatedReleasesOnDeveloperSite = deprecated.filter(version => versionSatisfiesRange(version, '<=2.16'))
4750

4851
module.exports = {
4952
supported,
@@ -57,5 +60,8 @@ module.exports = {
5760
dates,
5861
firstVersionDeprecatedOnNewSite,
5962
lastVersionWithoutStubbedRedirectFiles,
60-
lastReleaseWithLegacyFormat
63+
lastReleaseWithLegacyFormat,
64+
deprecatedReleasesWithLegacyFormat,
65+
deprecatedReleasesWithNewFormat,
66+
deprecatedReleasesOnDeveloperSite
6167
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const { liquid } = require('../lib/render-content')
2+
const layouts = require('../lib/layouts')
3+
const getMiniTocItems = require('../lib/get-mini-toc-items')
4+
5+
module.exports = async (req, res, next) => {
6+
if (!req.path.endsWith('/enterprise-server-releases')) return next()
7+
8+
const html = await liquid.parseAndRender(layouts['enterprise-server-releases'], req.context)
9+
10+
req.context.miniTocItems = getMiniTocItems(html)
11+
12+
return res.send(await liquid.parseAndRender(layouts['enterprise-server-releases'], req.context))
13+
}

middleware/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ module.exports = function (app) {
7474
app.use(require('./contextualizers/webhooks'))
7575
app.use(require('./breadcrumbs'))
7676
app.use(require('./early-access-breadcrumbs'))
77+
app.use(require('./enterprise-server-releases'))
7778
app.use(require('./dev-toc'))
7879
app.use(require('./featured-links'))
7980

0 commit comments

Comments
 (0)