Skip to content

Commit

Permalink
chore(code): add GitHub CodeQL quality tool
Browse files Browse the repository at this point in the history
  • Loading branch information
burgerni10 authored and Nicolas Burger committed Oct 24, 2022
1 parent fdca842 commit c7cd651
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 6 deletions.
5 changes: 1 addition & 4 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,5 @@
"lockFileMaintenance": { "enabled": true },
"schedule": [
"before 3am on Monday"
],
"npm": {
"stabilityDays": 3
}
]
}
39 changes: 39 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: "CodeQL"

on:
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
schedule:
- cron: '0 3 * * 1'

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

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]

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 }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
4 changes: 2 additions & 2 deletions src/south/south-rest/south-rest.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class SouthRest extends SouthConnector {
headers['Content-Length'] = bodyToSend.length
const requestOptions = {
method: this.requestMethod,
agent: this.acceptSelfSigned ? new https.Agent({ rejectUnauthorized: false }) : null, // lgtm [js/disabling-certificate-validation]
agent: this.acceptSelfSigned ? new https.Agent({ rejectUnauthorized: false }) : null,
timeout: this.connectionTimeout,
host: this.host,
port: this.port,
Expand All @@ -235,7 +235,7 @@ class SouthRest extends SouthConnector {
const fetchOptions = {
method: this.requestMethod,
headers,
agent: this.acceptSelfSigned ? new https.Agent({ rejectUnauthorized: false }) : null, // lgtm [js/disabling-certificate-validation]
agent: this.acceptSelfSigned ? new https.Agent({ rejectUnauthorized: false }) : null,
timeout: this.connectionTimeout,
}
const requestUrl = `${this.protocol}://${this.host}:${this.port}${this.endpoint}${
Expand Down

0 comments on commit c7cd651

Please sign in to comment.