Skip to content

Instantly share code, notes, and snippets.

View akanchhaS's full-sized avatar
:atom:

Akanchha Shrivastava akanchhaS

:atom:
  • Snyk
View GitHub Profile
@akanchhaS
akanchhaS / scan-sbom.sh
Created August 29, 2024 16:25
scan your third party SBOMs with snyk API
## Inputs the script will need the SBOM format and the sbom file.Example : ./scan-sbom.sh <name_of_the_sbom_file> CycloneDX.
# Check if the correct number os parameters were provided
if [ $# -ne 2 ]; then
echo "Usage: $0 SBOM_PATH SBOM_FORMAT"
exit 1
fi
# First parameter is SBOM path
@akanchhaS
akanchhaS / Snyk_aggregated_dep_fix.MD
Last active August 13, 2024 20:59
Python script generates a aggregated report of direct dependencies that need to be updated in your project to address vulnerabilities.

Snyk Dependency Fix Report

Overview

This Python script generates a comprehensive report of direct dependencies that need to be updated in your project to address vulnerabilities. The report includes:

  • Direct dependencies that require updates.
  • The maximum version to which each dependency should be updated.
  • A list of issues that will be fixed by updating, along with the affected packages.
@akanchhaS
akanchhaS / Snyk_API_auth.py
Last active January 23, 2024 17:02
Snyk API auth
import requests
SNYK_TOKEN = "add snyk token here"
# API endpoint url
url = "https://api.snyk.io/rest/orgs?version=2023-08-29&limit=100"
headers = {
'Accept': 'application/vnd.api+json',
'Authorization': f'token {SNYK_TOKEN}' # <-- SNYK_TOKEN referenced here
@akanchhaS
akanchhaS / README.md
Last active April 12, 2023 16:18
TeamCity Docker compose

Setting up team city server and agent on your local machine with Snyk security plugin

TeamCity is one of the popular Build Automation tools and requires running of the Server and agent.

There are different ways of installing it which you can read more about here. This document specifically lists out the steps of running it locally.

Note: This doc covers basic steps to get the Teamcity and snyk security plugin set up and running.

Prerequisites

@akanchhaS
akanchhaS / README.md
Last active July 29, 2022 03:32
Snyk Broker instructions

Connecting Snyk UI with on-prem SCM and JIRA requires setting up a broker client.

When setting up a Snyk broker, the client access is only enabled for Open Source manifest files and dockerfile access. However, to hook up the repositories for Snyk Code and IAC, one would need to set up "code agent" as well.

Note: The broker client and code-agent MUST be present in the same network.

Steps to set-up the broker client and code agent.

In this example we will set up broker + code agent with Gitab.

Step 0 - Before getting started with the following sets up ensure that:

@akanchhaS
akanchhaS / accept.json
Created February 4, 2022 03:30
GitLab - IAC + Code
{
"public": [
{
"//": "used for pushing up webhooks from gitlab",
"method": "POST",
"path": "/webhook/gitlab/:webhookId"
}
],
"private": [
{
@akanchhaS
akanchhaS / accept.json
Created February 3, 2022 18:24
accpet.json for code agent - Github - Code + IAC
{
"public": [
{
"//": "used for pushing up webhooks from github",
"method": "POST",
"path": "/webhook/github",
"valid": [
{
"//": "accept all pull request state changes (these don't have files in them)",
"path": "pull_request.state",