Skip to content

Commit

Permalink
Merge pull request #74 from andylockran/codeql
Browse files Browse the repository at this point in the history
CodeQL Fixes
  • Loading branch information
andylockran authored Dec 29, 2023
2 parents 2aa870d + 01336ba commit ef092fd
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 51,676 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,28 @@ on:
branches: [ "main" ]

jobs:
security-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkov GitHub Action
uses: bridgecrewio/checkov-action@v12
with:
# This will add both a CLI output to the console and create a results.sarif file
output_format: cli,sarif
output_file_path: console,results.sarif

- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2

# Results are generated only on a success or failure
# this is required since GitHub by default won't run the next step
# when the previous one has failed. Security checks that do not pass will 'fail'.
# An alternative is to add `continue-on-error: true` to the previous step
# Or 'soft_fail: true' to checkov.
if: success() || failure()
with:
sarif_file: results.sarif
build:

runs-on: ubuntu-latest
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,3 @@ jobs:
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

# Removing publishing to GH for now, given that I've got a package already on npm
# publish-gpr:
# needs: build
# runs-on: ubuntu-latest
# permissions:
# contents: read
# packages: write
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-node@v3
# with:
# node-version: 16.x
# registry-url: https://npm.pkg.github.com/
# scope: '@andylockran'
# - run: npm i
# - run: npm run build
# - run: npm publish
# env:
# NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
9 changes: 8 additions & 1 deletion examples/petstore_aws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -193,4 +193,11 @@ components:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
$ref: '#/components/schemas/Error'
securitySchemes:
encryptedScheme:
type: oauth2

security:
- oauth2: []

6 changes: 3 additions & 3 deletions functions/draft4.js
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ var require_codegen = __commonJS({
var Else = class extends BlockNode {
};
Else.kind = "else";
var If = class extends BlockNode {
var If = class _If extends BlockNode {
constructor(condition, nodes) {
super(nodes);
this.condition = condition;
Expand All @@ -570,10 +570,10 @@ var require_codegen = __commonJS({
}
if (e) {
if (cond === false)
return e instanceof If ? e : e.nodes;
return e instanceof _If ? e : e.nodes;
if (this.nodes.length)
return this;
return new If(not(cond), e instanceof If ? [e] : e.nodes);
return new _If(not(cond), e instanceof _If ? [e] : e.nodes);
}
if (cond === false || !this.nodes.length)
return void 0;
Expand Down
Loading

0 comments on commit ef092fd

Please sign in to comment.