Skip to content

Instantly share code, notes, and snippets.

View Moose0621's full-sized avatar

Andrew McCoy Moose0621

  • GitHub
  • CT
View GitHub Profile
@Moose0621
Moose0621 / sbom-to-csv.sh
Created September 11, 2023 18:23
sbom-to-csv
#!/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
@Moose0621
Moose0621 / runcodeQL.sh
Created May 19, 2021 22:04
Simple commands to run CodeQL CLI
#!/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
@Moose0621
Moose0621 / git-commiters.sh
Created January 12, 2021 23:02
git commands
git log --pretty=“%an %ae%n%cn %ce” --since “90 days ago” | sort | uniq
name: CodeQL
on:
push:
jobs:
build:
runs-on: ubuntu-latest
# 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
```
#!/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