Git Product home page Git Product logo

snykautomation's Introduction

snykAutomation

This repo is where I'll be posting my Snyk automation scripts that can be used to automate tasks inside Snyk. These scripts are for the enterprise version of Snyk not the free version for now.

CreateNewOrg.py

This script will take a list of organization names from a .csv file with one organization per line, as shown in the example file organization-names.csv. The script will then create new organizations in the group selected in the config file. For configuration details, refer to the config file section.

One thing to note: This API endpoint will be replaced with a REST API. I will update the script once the update is released. If this comment is still here, the new endpoint hasn't been released, and I haven't updated the script.

getOrgList.py

This script will retrieve a list of all your organizations from your Snyk portal along with the slug for each organization. It will then create a .csv file with each entry on a separate line. This is useful for integrating Snyk with AD for custom role mapping, especially when adding new developers to SSO. This ensures they are automatically added to specific applications. Find more info here: Snyk Custom Mapping.

Configuration Setup Instructions

  1. File Rename:
    Rename the config-template.py to config.py.

  2. Adding Credentials:
    Inside config.py, you'll need to add your groupId, sourceOrgId, and Authorization tokens.

    • groupId:
      This is your group ID value. To find it:

      • Navigate to your main group.
      • Look at the URL: https://app.snyk.io/group/{groupId}. The {groupId} portion is your value.
    • sourceOrgId:
      This represents the organization you'll use to clone all the configurations. It's a best practice when setting up Snyk to have a default organization with all your configurations in one place, making it easier to clone configurations to other organizations.

      • Go to the settings of your default organization.
      • Locate the "organization id". This will be the value for sourceOrgId in your config.py file.
    • Authorization Token:

      • Navigate to the bottom left side of the screen and click on your account.
      • Choose 'Account Settings'.
      • Under 'API Token', click 'click to show'. This reveals the token, which you'll use as the Authorization in your config.py file.

snykautomation's People

Contributors

nanjuan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.