Skip to content

Commit b45bf28

Browse files
initial code commit
1 parent 7d2d7ca commit b45bf28

File tree

138 files changed

+31765
-199
lines changed

Some content is hidden

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

138 files changed

+31765
-199
lines changed

.babelrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"presets": [
3+
"@babel/preset-env",
4+
"@babel/preset-react",
5+
"@babel/preset-typescript"
6+
]
7+
}

.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ENCRYPTION_SECRET=123912863265612376
2+
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# DISCLAIMER: This workflow file has been auto-generated and committed to the repo by the GitHub App from Contrast Security.
2+
# Manual edits to this file could cause the integration to produce unexpected behavior or break.
3+
# Version: 1.0.0
4+
# Last updated: 2023-07-26T17:49:54.636147096Z
5+
name: Contrast Security App Workflow
6+
on:
7+
workflow_dispatch:
8+
push:
9+
branches:
10+
- develop
11+
pull_request:
12+
types: [opened, synchronize, reopened]
13+
branches:
14+
- develop
15+
jobs:
16+
fingerprint_repo:
17+
if: ${{ github.actor != 'dependabot[bot]' }}
18+
runs-on: ubuntu-22.04
19+
steps:
20+
- name: Clone repository
21+
uses: actions/checkout@v3
22+
- name: Run Contrast SCA Fingerprint
23+
id: fingerprint
24+
uses: 'Contrast-Security-OSS/contrast-sca-action@v2'
25+
with:
26+
apiKey: ${{ secrets.CONTRAST_GITHUB_APP_API_KEY }}
27+
authHeader: ${{ secrets.CONTRAST_GITHUB_APP_AUTH_HEADER }}
28+
orgId: ${{ vars.CONTRAST_GITHUB_APP_ORG_ID }}
29+
apiUrl: ${{ vars.CONTRAST_GITHUB_APP_TS_URL }}
30+
repoUrl: ${{ github.server_url }}/${{ github.repository }}
31+
repoName: ${{ github.repository }}
32+
externalId: ${{ vars.CONTRAST_GITHUB_APP_ID }}
33+
command: fingerprint
34+
outputs:
35+
fingerprint: ${{ steps.fingerprint.outputs.fingerprint }}
36+
analyze_dependencies:
37+
if: ${{ needs.fingerprint_repo.outputs.fingerprint != '' }}
38+
needs: fingerprint_repo
39+
runs-on: ubuntu-22.04
40+
strategy:
41+
fail-fast: false
42+
matrix:
43+
manifest:
44+
- ${{ fromJson(needs.fingerprint_repo.outputs.fingerprint) }}
45+
steps:
46+
- name: Clone repository
47+
uses: actions/checkout@v3
48+
- name: Run Contrast SCA Audit
49+
uses: 'Contrast-Security-OSS/contrast-sca-action@v2'
50+
with:
51+
apiKey: ${{ secrets.CONTRAST_GITHUB_APP_API_KEY }}
52+
authHeader: ${{ secrets.CONTRAST_GITHUB_APP_AUTH_HEADER }}
53+
orgId: ${{ vars.CONTRAST_GITHUB_APP_ORG_ID }}
54+
apiUrl: ${{ vars.CONTRAST_GITHUB_APP_TS_URL }}
55+
filePath: ${{ matrix.manifest.filePath }}
56+
repositoryId: ${{ matrix.manifest.repositoryId }}
57+
projectGroupId: ${{ matrix.manifest.projectGroupId }}

.github/workflows/quality.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Quality checks
2+
on: push
3+
permissions:
4+
contents: read
5+
pull-requests: read
6+
packages: read
7+
jobs:
8+
Lint:
9+
runs-on: ubuntu-latest
10+
env:
11+
GH_API_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12+
steps:
13+
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
14+
- name: Install modules
15+
run: npm ci
16+
- name: eslint
17+
run: npm run lint
18+
- name: prettier
19+
run: npm run format:check
20+
Unit-tests:
21+
runs-on: ubuntu-latest
22+
env:
23+
GH_API_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
steps:
25+
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
26+
- name: Install modules
27+
run: npm ci
28+
- name: Unit tests
29+
run: npm run test:coverage
30+
- name: Upload Coverage
31+
uses: actions/upload-artifact@604373da6381bf24206979c74d06a550515601b9 # v4.4.2
32+
with:
33+
name: jest
34+
path: coverage/lcov.info
35+
- name: Unit tests
36+
run: cp coverage/lcov.info coverage/lcov-report/unit-lcov.info
37+
38+
sonarcloud:
39+
name: SonarCloud
40+
runs-on: ubuntu-latest
41+
needs:
42+
- Unit-tests
43+
steps:
44+
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
45+
with:
46+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
47+
48+
- name: Download Coverage Results
49+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
50+
with:
51+
path: coverage
52+
53+
- name: SonarCloud Scan
54+
uses: SonarSource/sonarcloud-github-action@eb211723266fe8e83102bac7361f0a05c3ac1d1b # v3.0.0
55+
env:
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
57+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
out
2+
dist
3+
node_modules
4+
.vscode-test/
5+
*.vsix
6+
logs
7+
out
8+
coverage/*
9+
.vscode/logs

.idea/.gitignore

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/contrast-vscode-plugin.iml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/git_toolbox_blame.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)