Skip to content

Commit

Permalink
Merge branch service-v7 into merge-latest-lisk-server
Browse files Browse the repository at this point in the history
  • Loading branch information
reyraa committed Sep 11, 2023
2 parents 7835345 + 15bc1bb commit ec3ad00
Show file tree
Hide file tree
Showing 705 changed files with 92,972 additions and 192,246 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ test
*.gz
*.sql
*.zst
services/**/data/**
3 changes: 3 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
paths-ignore:
- ./docs
- ./known_accounts
13 changes: 13 additions & 0 deletions .github/semgrep/rule.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
rules:
- id: schema_hardcoded_pattern
message: A fastest-validator schema uses a hardcoded pattern instead of a constant
languages:
- javascript
severity: WARNING
patterns:
- pattern-inside: >
{
params: {
$X: { pattern: /.../ },
}
}
10 changes: 9 additions & 1 deletion .github/workflows/branch-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,12 @@ jobs:
- name: Install dependencies
run: make build-local
- name: Check test coverage
run: npm run test:coverage
run: yarn run test:coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: coverage-final.json
name: codecov-umbrella
verbose: true
59 changes: 59 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "development", feature/*, hotfix/*, main, release/* ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "development", feature/*, hotfix/*, release/* ]
schedule:
- cron: '30 3 * * 2'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: true
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/codeql-config.yml
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
20 changes: 20 additions & 0 deletions .github/workflows/dependency.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependency Review Action
#
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
name: 'Dependency Review'
on: [pull_request]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
- name: 'Dependency Review'
uses: actions/dependency-review-action@v2
10 changes: 9 additions & 1 deletion .github/workflows/pr-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,12 @@ jobs:
- name: Install dependencies
run: make build-local
- name: Check test coverage
run: npm run test:coverage
run: yarn run test:coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: coverage-final.json
name: codecov-umbrella
verbose: true
45 changes: 45 additions & 0 deletions .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Name of this GitHub Actions workflow.
name: Semgrep

on:
push:
branches: [ "development", feature/*, hotfix/*, main, release/* ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "development", feature/*, hotfix/*, release/* ]
# Schedule the CI job (this method uses cron syntax):
schedule:
- cron: '30 3 * * 2'
# It is recommended to change the schedule to a random time.

jobs:
semgrep:
# User definable name of this GitHub Actions job.
name: semgrep/ci
# If you are self-hosting, change the following `runs-on` value:
runs-on: ubuntu-latest

container:
# A Docker image with Semgrep installed. Do not change this.
image: returntocorp/semgrep

# Skip any PR created by dependabot to avoid permission issues:
if: (github.actor != 'dependabot[bot]')

steps:
# Fetch project source with GitHub Actions Checkout.
- uses: actions/checkout@v3
# Run the "semgrep ci" command on the command line of the docker image.
- run: semgrep --sarif --output=semgrep.sarif --metrics off
env:
# Connect to Semgrep Cloud Platform through your SEMGREP_APP_TOKEN.
# Generate a token from Semgrep Cloud Platform > Settings
# and add it to your GitHub secrets.
# SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
SEMGREP_RULES: "p/javascript p/r2c p/r2c-security-audit p/r2c-best-practices p/nodejs p/nodejsscan ./.github/semgrep/rule.yaml"

- name: Upload SARIF file for GitHub Advanced Security Dashboard
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: semgrep.sarif
if: always()
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ docker/graylog/data*

# Database snapshots
*.gz.*
*.sql
*.zst
*.sql
!docker/*/*.sql

# Legacy configs
*.old
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.20
18.16
Loading

0 comments on commit ec3ad00

Please sign in to comment.