Skip to content

Commit ed9e55c

Browse files
committed
Initial commit
0 parents  commit ed9e55c

13,975 files changed

Lines changed: 2635882 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lib/*.js linguist-generated=true

.github/codeql/codeql-config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
me: "CodeQL config"
2+
queries:
3+
- name: Run custom queries
4+
uses: ./queries

.github/pull_request_template.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
### Merge / deployment checklist
2+
3+
- Run test builds as necessary. Can be on this repository or [elsewhere](https://github.com/github/turbo-scan/#testing-changes-to-codeql-action) as needed in order to test the change.
4+
- [ ] CodeQL using init/finish actions
5+
- [ ] 3rd party tool using upload action
6+
- [ ] Confirm this change is backwards compatible with existing workflows.
7+
- [ ] Confirm the [readme](https://github.com/github/codeql-action/blob/master/README.md) and [sarif-demo](https://github.com/Anthophila/sarif-demo) have been updated if necessary.
8+
9+
### Rollout plan for codeql-action
10+
https://github.com/github/dsp-code-scanning/blob/master/docs/code-scanning-action-rollout-plan.md

.github/workflows/codeql.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: "CodeQL action"
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v1
12+
- uses: ./codeql/init
13+
with:
14+
config-file: ./.github/codeql/codeql-config.yml
15+
- uses: ./codeql/finish
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: "Integration Testing"
2+
3+
on: [push]
4+
5+
# Adding new repositories to be integration tested
6+
# 0) Repo needs to be set up with the codeql action working (e.g. have a CODEQL_SSH_KEY as a secret)
7+
# https://github.com/github/dsp-code-scanning/issues/312#issuecomment-577631601
8+
# 1) Add the `codeql-testuser` to the repository with WRITE permissions (Important!)
9+
# 2) Put a copy of the workflow as `.github/workflows/integration-test.yml` in the target repo. You can find a copy of the workflow here: https://raw.githubusercontent.com/Anthophila/amazon-cognito-js-copy/master/.github/workflows/integration-test.ym
10+
# 3) Copy and paste the block below filling in the repo owner/name
11+
# curl -X POST \
12+
# -H "Authorization: Bearer ${{ secrets.CODEQL_TESTING_TOKEN }}" \
13+
# -H "Accept: application/vnd.github.everest-preview+json" \
14+
# https://api.github.com/repos/OWNER/NAME/dispatches \
15+
# -d '{"event_type":"codeql-integration","client_payload": {"sha": "${{ github.sha }}"}}'
16+
17+
# add another job that creates a new check suite using the API, send check suite id in our payload
18+
19+
jobs:
20+
dispatch-events:
21+
if: github.event.repository.full_name == 'github/codeql-action'
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Send repository dispatch events
25+
run: |
26+
curl -X POST \
27+
-H "Authorization: Bearer ${{ secrets.CODEQL_TESTING_TOKEN }}" \
28+
-H "Accept: application/vnd.github.everest-preview+json" \
29+
https://api.github.com/repos/Anthophila/amazon-cognito-js-copy/dispatches \
30+
-d '{"event_type":"codeql-integration","client_payload": {"sha": "${{ github.sha }}"}}'
31+
32+
curl -X POST \
33+
-H "Authorization: Bearer ${{ secrets.CODEQL_TESTING_TOKEN }}" \
34+
-H "Accept: application/vnd.github.everest-preview+json" \
35+
https://api.github.com/repos/Anthophila/electron-test-action/dispatches \
36+
-d '{"event_type":"codeql-integration","client_payload": {"sha": "${{ github.sha }}"}}'
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: "Check generated JavaScript"
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
check-js:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v1
11+
- name: Check generated JavaScript
12+
run: |
13+
# Sanity check that repo is clean to start with
14+
if [ ! -z "$(git status --porcelain)" ]; then
15+
# If we get a fail here then this workflow needs attention...
16+
>&2 echo "Failed: Repo should be clean before testing!"
17+
exit 1
18+
fi
19+
# Generate the JavaScript files
20+
npm run-script build
21+
# Check that repo is still clean
22+
if [ ! -z "$(git status --porcelain)" ]; then
23+
# If we get a fail here then the PR needs attention
24+
>&2 echo "Failed: JavaScript files are not up to date. Run 'npm run-script build' to update"
25+
exit 1
26+
fi
27+
echo "Success: JavaScript files are up to date"

.github/workflows/mirror.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Mirror changes to this repo to Anthophila/codeql-action
2+
# whenever a PR is merged into master.
3+
name: "Mirror to Anthophila/codeql-action"
4+
5+
# TODO change to trigger when master branch pushed/PR-merged
6+
on:
7+
push:
8+
branches:
9+
- master
10+
11+
jobs:
12+
mirror:
13+
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v1
18+
- name: Mirror
19+
run: |
20+
# Only run if running on private repo
21+
if [ "${{ github.event.repository.full_name }}" == "github/codeql-action" ]; then
22+
# setup deploy key
23+
mkdir -p ~/.ssh
24+
echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_rsa
25+
chmod 600 ~/.ssh/id_rsa
26+
# add public repo as remote and push to it
27+
git checkout master
28+
git remote add public git@github.com:Anthophila/codeql-action.git
29+
git push public master
30+
else
31+
echo "This workflow should only run on github/codeql-action"
32+
fi

.github/workflows/npm-test.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: "npm run-script test"
2+
3+
on: [push]
4+
5+
jobs:
6+
npm-test:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v1
11+
- name: npm run-script test
12+
run: npm run-script test

.github/workflows/ts-lint.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: "TSLint"
2+
3+
on: [push]
4+
5+
jobs:
6+
tslint:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v1
11+
- name: tslint
12+
run: npm run-script lint

CODE_OF_CONDUCT.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
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, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
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
22+
23+
Examples of unacceptable behavior by participants include:
24+
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+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies within all project spaces, and it also applies when
49+
an individual is representing the project or its community in public spaces.
50+
Examples of representing a project or community include using an official
51+
project e-mail address, posting via an official social media account, or acting
52+
as an appointed representative at an online or offline event. Representation of
53+
a project may be further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at opensource@github.com. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

0 commit comments

Comments
 (0)