Skip to content

Commit

Permalink
Merge pull request #109 from PagerDuty/release/0.8.1-beta.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gsreynolds authored Jun 28, 2023
2 parents 012b5ec + e4b7fa1 commit 652bfdc
Show file tree
Hide file tree
Showing 28 changed files with 670 additions and 287 deletions.
70 changes: 0 additions & 70 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

78 changes: 78 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# 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: [ "main", "develop" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "develop" ]
merge_group:
schedule:
- cron: '0 6 * * *'

jobs:
analyze:
name: Analyze
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
# 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 }}
# 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.

# For more 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


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
20 changes: 20 additions & 0 deletions .github/workflows/dependency-review.yml
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
4 changes: 3 additions & 1 deletion .github/workflows/lint-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: ESLint

on: [pull_request]
on:
pull_request:
merge_group:

jobs:
eslint:
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/snyk-security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# A sample workflow which sets up Snyk to analyze the full Snyk platform (Snyk Open Source, Snyk Code,
# Snyk Container and Snyk Infrastructure as Code)
# The setup installs the Snyk CLI - for more details on the possible commands
# check https://docs.snyk.io/snyk-cli/cli-reference
# The results of Snyk Code are then uploaded to GitHub Security Code Scanning
#
# In order to use the Snyk Action you will need to have a Snyk API token.
# More details in https://github.com/snyk/actions#getting-your-snyk-token
# or you can signup for free at https://snyk.io/login
#
# For more examples, including how to limit scans to only high-severity issues
# and fail PR checks, see https://github.com/snyk/actions/

name: Snyk Security

on:
push:
branches: ["main", "develop"]
pull_request:
branches: ["develop"]

permissions:
contents: read

jobs:
snyk:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Snyk CLI to check for security issues
# Snyk can be used to break the build when it detects security issues.
# In this case we want to upload the SAST issues to GitHub Code Scanning
uses: snyk/actions/setup@master
env:
# This is where you will need to introduce the Snyk API token created with your Snyk account
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

# For Snyk Open Source you must first set up the development environment for your application's dependencies
# For example for Node
- uses: actions/setup-node@master
with:
node-version: 16

# Runs Snyk Code (SAST) analysis and uploads result into GitHub.
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/node@master
continue-on-error: true # To make sure that SARIF upload gets called
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
args: --sarif-file-output=snyk-code.sarif

# Push the Snyk Code results into GitHub Code Scanning tab
- name: Upload result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: snyk-code.sarif
4 changes: 2 additions & 2 deletions .github/workflows/test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Test Framework Suite

on:
pull_request:
branches:
- develop
branches: [ "develop" ]
merge_group:

concurrency:
group: 'develop'
Expand Down
14 changes: 13 additions & 1 deletion cypress/e2e/Settings/settings.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,19 @@ describe('Manage Settings', { failFast: { enabled: false } }, () => {
it('Add valid custom alert column to incident table', () => {
const customAlertColumnDefinitions = ['Quote:details.quote'];
manageCustomAlertColumnDefinitions(customAlertColumnDefinitions);
// manageIncidentTableColumns('add', customAlertColumnDefinitions);
customAlertColumnDefinitions.forEach((columnName) => {
const header = columnName.split(':')[0];
cy.get(`[data-column-name="${header}"]`).scrollIntoView().should('be.visible');
cy.get(`[data-incident-header="${header}"][data-incident-row-cell-idx="0"]`).then(($el) => {
// eslint-disable-next-line no-unused-expressions
expect($el.text()).to.exist;
});
});
});

it('Add valid custom alert column with JSON path containing spaces to incident table', () => {
const customAlertColumnDefinitions = ["Fav Flavour:details.['favorite ice cream flavor']"];
manageCustomAlertColumnDefinitions(customAlertColumnDefinitions);
customAlertColumnDefinitions.forEach((columnName) => {
const header = columnName.split(':')[0];
cy.get(`[data-column-name="${header}"]`).scrollIntoView().should('be.visible');
Expand Down
4 changes: 3 additions & 1 deletion cypress/support/util/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,9 @@ export const manageCustomAlertColumnDefinitions = (customAlertColumnDefinitions)
cy.get('input[placeholder="Header"]').type(header);
cy.get('input[placeholder="JSON Path"]').type(accessorPath);
cy.get('button[aria-label="Add custom column"]').click();
cy.get(`#column-${accessorPath.replace('.', '\\.')}-add-icon`).click();
// Need to escape special characters in accessorPath
// https://docs.cypress.io/faq/questions/using-cypress-faq#How-do-I-use-special-characters-with-cyget
cy.get(`#column-${Cypress.$.escapeSelector(accessorPath)}-add-icon`).click();
});
cy.get('#save-columns-button').click();
checkActionAlertsModalContent('Incident table columns saved');
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "pd-live-react",
"homepage": "https://pagerduty.github.io/pd-live-react",
"version": "0.8.0-beta.0",
"version": "0.8.1-beta.0",
"private": true,
"dependencies": {
"@braintree/sanitize-url": "^6.0.2",
"@chakra-ui/icons": "^2.0.19",
"@chakra-ui/react": "^2.6.1",
"@craco/craco": "7.0.0",
"@datadog/browser-rum": "^4.32.1",
"@datadog/browser-rum": "^4.43.0",
"@emotion/react": "^11.10.8",
"@emotion/styled": "^11.10.8",
"@fortawesome/fontawesome-svg-core": "^6.2.0",
Expand All @@ -18,9 +18,9 @@
"@fortawesome/react-fontawesome": "^0.2.0",
"@pagerduty/pdjs": "^2.2.3",
"@types/jest": "^29.5.1",
"@types/node": "^18.16.3",
"@types/node": "^20.3.2",
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.1",
"@types/react-dom": "^18.2.6",
"autoprefixer": "10.4.13",
"axios": "^1.2.4",
"babel-eslint": "^10.1.0",
Expand All @@ -42,16 +42,16 @@
"node-sass": "^7.0.3",
"pretty-print-error": "^1.1.1",
"react": "^18",
"react-bootstrap": "^1.6.6",
"react-bootstrap": "^2.8.0",
"react-contextmenu": "^2.14.0",
"react-datepicker": "^4.10.0",
"react-datepicker": "^4.14.1",
"react-dnd": "^16.0.1",
"react-dnd-html5-backend": "^16.0.1",
"react-dom": "^18",
"react-i18next": "^12.1.5",
"react-icons": "^4.8.0",
"react-inject-env": "^2.0.1",
"react-intersection-observer": "^9.4.4",
"react-intersection-observer": "^9.5.1",
"react-minimal-pie-chart": "^8.4.0",
"react-redux": "^8.0.5",
"react-scripts": "5.0.1",
Expand Down Expand Up @@ -110,7 +110,7 @@
"devDependencies": {
"@4tw/cypress-drag-drop": "^2.2.1",
"@babel/preset-env": "^7.18.9",
"@babel/preset-react": "^7.16.7",
"@babel/preset-react": "^7.22.5",
"@cypress/react": "7.0.1",
"@cypress/webpack-dev-server": "^3.2.3",
"@faker-js/faker": "^8.0.2",
Expand All @@ -137,7 +137,7 @@
"genversion": "^3.1.1",
"gh-pages": "^4.0.0",
"html-webpack-plugin": "5",
"i18next-parser": "^7.6.0",
"i18next-parser": "^8.0.0",
"identity-obj-proxy": "^3.0.0",
"jest-canvas-mock": "^2.4.0",
"jest-location-mock": "^1.0.9",
Expand Down
Loading

0 comments on commit 652bfdc

Please sign in to comment.