This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Define the GitHub API URL for the Dependency Graph Endpoint | |
owner="octodemo" | |
repo="demo-vulnerabilities-ghas" | |
url="https://api.github.com/repos/$owner/$repo/dependency-graph/sbom" | |
# GitHub CLI api | |
# https://cli.github.com/manual/gh_api |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
databaseDir=$1 | |
language=$2 | |
codeql database create $databaseDir --language $language --source-root . --command='mvn package -DskipTests=true' | |
codeql database analyze $databaseDir $language-code-scanning.qls --format=sarif-latest --output=output.sarif | |
codeql github upload-results -r Org/Repo -f refs/heads/BRANCH_NAME_HERE -c PUT_COMMIT_HASH_HERE -s output.sarif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git log --pretty=“%an %ae%n%cn %ce” --since “90 days ago” | sort | uniq | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CodeQL | |
on: | |
push: | |
jobs: | |
build: | |
runs-on: ubuntu-latest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using a Private Action | |
You can run a private action in a separate repository using a separate checkout step with a PAT and running it as a local action. | |
An action like: | |
```yaml | |
- name: My Action | |
uses: joshmgross/private-action@v1 | |
with: | |
input1: value1 | |
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# The following comment lines are used by the init setup script like the | |
# chkconfig command for RedHat based distributions. Change as | |
# appropriate for your installation. | |
### BEGIN INIT INFO | |
# Provides: nexus-iq-server | |
# Required-Start: $local_fs $remote_fs $network $time $named | |
# Required-Stop: $local_fs $remote_fs $network $time $named |