Skip to content

Commit 6c45e1c

Browse files
authored
Merge branch 'master' into run_built_in_rules3
2 parents c7f1372 + cb2f9b2 commit 6c45e1c

17 files changed

+206
-123
lines changed

.github/workflows/action_scanning.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,22 @@
11
### Required actions to scan GitHub action workflows for security issues.
22
name: 'Scan GitHub Action workflows files for security issues'
3-
43
on:
54
pull_request: {}
6-
75
permissions:
86
contents: 'read'
97
security-events: 'write'
108
actions: 'read'
11-
129
jobs:
1310
semgrep:
1411
name: 'semgrep-oss/scan'
1512
runs-on: 'ubuntu-latest'
16-
1713
container:
1814
image: 'index.docker.io/semgrep/semgrep@sha256:85782eaf09692e6dfb684cd3bad87ef315775814b01f76b4d15582e4ca7c1c89' # ratchet:semgrep/semgrep
19-
2015
# Skip any PR created by dependabot to avoid permission issues:
2116
if: (github.actor != 'dependabot[bot]')
22-
2317
steps:
2418
- name: 'Checkout Code'
2519
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # ratchet:actions/checkout@v4
26-
2720
- name: 'Checkout Workflow Config'
2821
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # ratchet:actions/checkout@v4
2922
env:
@@ -33,14 +26,12 @@ jobs:
3326
path: action_scanning
3427
- name: 'Run Actions semgrep scan'
3528
run: 'semgrep scan --sarif --config action_scanning/semgrep-rules --config "p/github-actions" >> semgrep-results-actions.sarif'
36-
3729
- name: 'Save Actions SARIF results as artifact'
3830
uses: 'actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02' # ratchet:actions/upload-artifact@v4
3931

4032
with:
4133
name: 'semgrep-scan-results-actions'
4234
path: 'semgrep-results-actions.sarif'
43-
4435
- name: 'Upload Actions SARIF result to the GitHub Security Dashboard'
4536
uses: 'github/codeql-action/upload-sarif@1b549b9259bda1cb5ddde3b41741a82a2d15a841' # ratchet:github/codeql-action/upload-sarif@v3
4637
with:
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### Ensure that markdown files are properly formatted
2+
name: 'Check Markdown Format'
3+
on:
4+
pull_request:
5+
paths:
6+
- '**.md'
7+
jobs:
8+
mdformat:
9+
name: 'mdformat'
10+
runs-on: 'ubuntu-latest'
11+
steps:
12+
- name: 'Checkout Code'
13+
uses: 'actions/checkout@v4'
14+
- name: 'Check Markdown Format'
15+
run: 'tools/mdformat --check --wrap 100 .'

.github/workflows/publish_docs.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: 'Publish Docs Site'
2+
on:
3+
push:
4+
branches:
5+
- master
6+
paths:
7+
- '**.md'
8+
- '.github/workflow/publish*'
9+
workflow_dispatch:
10+
permissions:
11+
pages: 'write'
12+
id-token: 'write'
13+
jobs:
14+
build-and-deploy:
15+
name: "Build and Deploy Docs"
16+
runs-on: 'ubuntu-latest'
17+
steps:
18+
- uses: 'actions/checkout@v4'
19+
- name: 'Generate HTML from Markdown'
20+
uses: 'ldeluigi/markdown-docs@latest'
21+
with:
22+
src: 'docs'
23+
dst: 'generated-pages'
24+
- name: 'Install rsync'
25+
run: 'apt-get update && apt-get install -y rsync'
26+
- name: 'Deploy Docs'
27+
uses: JamesIves/github-pages-deploy-action@v4
28+
with:
29+
folder: generated-pages
30+
force: false
31+
clean-exclude: pr-preview/
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: 'Publish Preview of Docs Site'
2+
on:
3+
pull_request:
4+
types:
5+
- opened
6+
- reopened
7+
- synchronize
8+
- closed
9+
permissions:
10+
contents: 'write'
11+
pull-requests: 'write'
12+
jobs:
13+
build:
14+
name: "Build PR Preview Docs"
15+
runs-on: 'ubuntu-latest'
16+
steps:
17+
- uses: 'actions/checkout@v4'
18+
- name: 'Generate HTML from Markdown'
19+
uses: 'ldeluigi/markdown-docs@latest'
20+
with:
21+
src: 'docs'
22+
dst: 'generated-pages'
23+
- name: 'Deploy GitHub Pages Preview'
24+
uses: rossjrw/pr-preview-action@v1
25+
with:
26+
source-dir: './generated-pages/'
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
### Ensure that our local testing always passes
2+
name: 'Run semgrep tests'
3+
on:
4+
pull_request: {}
5+
permissions:
6+
contents: 'read'
7+
actions: 'read'
8+
jobs:
9+
semgrep-tests:
10+
name: 'Run semgrep tests'
11+
runs-on: 'ubuntu-latest'
12+
container:
13+
image: index.docker.io/semgrep/semgrep@sha256:85782eaf09692e6dfb684cd3bad87ef315775814b01f76b4d15582e4ca7c1c89 # ratchet:semgrep/semgrep
14+
# Skip any PR created by dependabot to avoid permission issues:
15+
if: (github.actor != 'dependabot[bot]')
16+
steps:
17+
- name: 'Checkout Code'
18+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # ratchet:actions/checkout@v4
19+
- name: 'Run Actions semgrep scan'
20+
run: 'semgrep --test --config semgrep-rules semgrep-tests'

.github/workflows/semver_testing.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.github/workflows/yaml_format.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
### Ensure that Yaml files are properly formatted
2+
name: 'Check Yaml Format'
3+
on:
4+
pull_request:
5+
paths:
6+
- '**.yml'
7+
- '**.yaml'
8+
jobs:
9+
yamlfmt:
10+
name: 'yamlfmt'
11+
runs-on: 'ubuntu-latest'
12+
steps:
13+
- name: 'Checkout Code'
14+
uses: 'actions/checkout@v4'
15+
- name: 'Check Yaml Format'
16+
run: 'tools/yamlfmt --lint .'

.yamlfmt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
formatter:
2+
max_line_length: 100
3+
trim_trailing_whitespace: true

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# The Home of GitHub Source Solutions
22

3-
This is where the team that manages GitHub for Google places things (like required workflows) to use across the enterprise.
3+
This is where the team that manages GitHub for Google places things (like required workflows) to use
4+
across the enterprise.
45

5-
We also own a number of other repositories. See them [here](https://github.com/topics/github-source-solutions)
6+
We also own a number of other repositories. See them
7+
[here](https://github.com/topics/github-source-solutions)

docs/code-of-conduct.md

Lines changed: 56 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -2,94 +2,82 @@
22

33
## Our Pledge
44

5-
In the interest of fostering an open and welcoming environment, we as
6-
contributors and maintainers pledge to making participation in our project and
7-
our community a harassment-free experience for everyone, regardless of age, body
8-
size, disability, ethnicity, gender identity and expression, level of
9-
experience, education, socio-economic status, nationality, personal appearance,
10-
race, religion, or sexual identity and orientation.
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers
6+
pledge to making participation in our project and our community a harassment-free experience for
7+
everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level
8+
of experience, education, socio-economic status, nationality, personal appearance, race, religion,
9+
or sexual identity and orientation.
1110

1211
## Our Standards
1312

14-
Examples of behavior that contributes to creating a positive environment
15-
include:
13+
Examples of behavior that contributes to creating a positive environment include:
1614

17-
* Using welcoming and inclusive language
18-
* Being respectful of differing viewpoints and experiences
19-
* Gracefully accepting constructive criticism
20-
* Focusing on what is best for the community
21-
* Showing empathy towards other community members
15+
- Using welcoming and inclusive language
16+
- Being respectful of differing viewpoints and experiences
17+
- Gracefully accepting constructive criticism
18+
- Focusing on what is best for the community
19+
- Showing empathy towards other community members
2220

2321
Examples of unacceptable behavior by participants include:
2422

25-
* The use of sexualized language or imagery and unwelcome sexual attention or
26-
advances
27-
* Trolling, insulting/derogatory comments, and personal or political attacks
28-
* Public or private harassment
29-
* Publishing others' private information, such as a physical or electronic
30-
address, without explicit permission
31-
* Disrespecting the community's time by sending spam or other unsolicited
32-
commercial messages
33-
* Other conduct which could reasonably be considered inappropriate in a
34-
professional setting
23+
- The use of sexualized language or imagery and unwelcome sexual attention or advances
24+
- Trolling, insulting/derogatory comments, and personal or political attacks
25+
- Public or private harassment
26+
- Publishing others' private information, such as a physical or electronic address, without explicit
27+
permission
28+
- Disrespecting the community's time by sending spam or other unsolicited commercial messages
29+
- Other conduct which could reasonably be considered inappropriate in a professional setting
3530

3631
## Our Responsibilities
3732

38-
Project maintainers are responsible for clarifying the standards of acceptable
39-
behavior and are expected to take appropriate and fair corrective action in
40-
response to any instances of unacceptable behavior.
33+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are
34+
expected to take appropriate and fair corrective action in response to any instances of unacceptable
35+
behavior.
4136

42-
Project maintainers have the right and responsibility to remove, edit, or reject
43-
comments, commits, code, wiki edits, issues, and other contributions that are
44-
not aligned to this Code of Conduct, or to ban temporarily or permanently any
45-
contributor for other behaviors that they deem inappropriate, threatening,
46-
offensive, or harmful.
37+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits,
38+
code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or
39+
to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate,
40+
threatening, offensive, or harmful.
4741

4842
## Scope
4943

50-
This Code of Conduct applies both within project spaces and in public spaces
51-
when an individual is representing the project or its community. Examples of
52-
representing a project or community include using an official project e-mail
53-
address, posting via an official social media account, or acting as an appointed
54-
representative at an online or offline event. Representation of a project may be
44+
This Code of Conduct applies both within project spaces and in public spaces when an individual is
45+
representing the project or its community. Examples of representing a project or community include
46+
using an official project e-mail address, posting via an official social media account, or acting as
47+
an appointed representative at an online or offline event. Representation of a project may be
5548
further defined and clarified by project maintainers.
5649

57-
This Code of Conduct also applies outside the project spaces when the Project
58-
Steward has a reasonable belief that an individual's behavior may have a
59-
negative impact on the project or its community.
50+
This Code of Conduct also applies outside the project spaces when the Project Steward has a
51+
reasonable belief that an individual's behavior may have a negative impact on the project or its
52+
community.
6053

6154
## Conflict Resolution
6255

63-
We do not believe that all conflict is bad; healthy debate and disagreement
64-
often yield positive results. However, it is never okay to be disrespectful or
65-
to engage in behavior that violates the project’s code of conduct.
66-
67-
If you see someone violating the code of conduct, you are encouraged to address
68-
the behavior directly with those involved. Many issues can be resolved quickly
69-
and easily, and this gives people more control over the outcome of their
70-
dispute. If you are unable to resolve the matter for any reason, or if the
71-
behavior is threatening or harassing, report it. We are dedicated to providing
72-
an environment where participants feel welcome and safe.
73-
74-
Reports should be directed to *[PROJECT STEWARD NAME(s) AND EMAIL(s)]*, the
75-
Project Steward(s) for *[PROJECT NAME]*. It is the Project Steward’s duty to
76-
receive and address reported violations of the code of conduct. They will then
77-
work with a committee consisting of representatives from the Open Source
78-
Programs Office and the Google Open Source Strategy team. If for any reason you
79-
are uncomfortable reaching out to the Project Steward, please email
80-
opensource@google.com.
81-
82-
We will investigate every complaint, but you may not receive a direct response.
83-
We will use our discretion in determining when and how to follow up on reported
84-
incidents, which may range from not taking action to permanent expulsion from
85-
the project and project-sponsored spaces. We will notify the accused of the
86-
report and provide them an opportunity to discuss it before any action is taken.
87-
The identity of the reporter will be omitted from the details of the report
88-
supplied to the accused. In potentially harmful situations, such as ongoing
89-
harassment or threats to anyone's safety, we may take action without notice.
56+
We do not believe that all conflict is bad; healthy debate and disagreement often yield positive
57+
results. However, it is never okay to be disrespectful or to engage in behavior that violates the
58+
project’s code of conduct.
59+
60+
If you see someone violating the code of conduct, you are encouraged to address the behavior
61+
directly with those involved. Many issues can be resolved quickly and easily, and this gives people
62+
more control over the outcome of their dispute. If you are unable to resolve the matter for any
63+
reason, or if the behavior is threatening or harassing, report it. We are dedicated to providing an
64+
environment where participants feel welcome and safe.
65+
66+
Reports should be directed to *[PROJECT STEWARD NAME(s) AND EMAIL(s)]*, the Project Steward(s) for
67+
*[PROJECT NAME]*. It is the Project Steward’s duty to receive and address reported violations of the
68+
code of conduct. They will then work with a committee consisting of representatives from the Open
69+
Source Programs Office and the Google Open Source Strategy team. If for any reason you are
70+
uncomfortable reaching out to the Project Steward, please email opensource@google.com.
71+
72+
We will investigate every complaint, but you may not receive a direct response. We will use our
73+
discretion in determining when and how to follow up on reported incidents, which may range from not
74+
taking action to permanent expulsion from the project and project-sponsored spaces. We will notify
75+
the accused of the report and provide them an opportunity to discuss it before any action is taken.
76+
The identity of the reporter will be omitted from the details of the report supplied to the accused.
77+
In potentially harmful situations, such as ongoing harassment or threats to anyone's safety, we may
78+
take action without notice.
9079

9180
## Attribution
9281

93-
This Code of Conduct is adapted from the Contributor Covenant, version 1.4,
94-
available at
82+
This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at
9583
https://www.contributor-covenant.org/version/1/4/code-of-conduct/

0 commit comments

Comments
 (0)