Giter Club home page Giter Club logo

crunch-support's Introduction

================================================================================


What is it?

This is an inhouse build python module for 42crunch platform support. Download it directly, before installing it into your local environment:

$ pip install crunch_support-1.0-py3-none-any.whl 

Once installed, the bundled utility scripts would also be placed into your local bin path. For example:

$ which api-audit
/usr/local/bin/api-audit

42Crunch

42Crunch is a specialist tool for cloud API security automation. The production system is software as a service (SaaS) platform hosted at the URI: https://platform.us.42crunch.cloud/login In order to access it, you'll need to contact the Security team for the access provision.

42Crunch API Access

42Crunch provides API access to its core platform functions. Refer to the 42Crunch postman collections for example: https://www.postman.com/get-42crunch/workspace/42crunch-api/folder/13761657-a7ad81b7-11bc-4b6f-a379-5f53a900af92?ctx=documentation

Inside Toolbox

The following custom tools are available within this toolbox:

api-audit

Automation script / workflow for Cloud API audit. For example, the script would read the configuration from the 'api-audit-cloud.yaml' file, then submit/update the OpenAPI swagger files into 42Crunch platform for audit accordingly:

$ api-audit -k $c_key_dev -b ~/apps/xxx/ -y src/conf/api-scan-xxx.yaml -e development 
...
Initiate a 42crunch client instance
Loading instance configuration from file:  src/conf/api-scan-xxx.yaml
Retrieve 42c collection list ...
Make get request to endpoint  https://platform.42crunch.com/api/v1/collections
Make post request to endpoint  https://platform.42crunch.com/api/v1/collections
Successfully create new collection in 42Crunch platform: xxx-xxx_insights_service
Update 42c colllection list accordingly
{"desc":{"id":"64e7de1a-4522-438e-9287-b53a9cea7463","name":"xxx-xxx_insights_service","technicalName":"64e7de1a-4522-438e-9287-b53a9cea7463","source":"default","isShared":true,"isSharedWrite":false},"summary":{"org":{"name":"xxx"},"read":true,"write":true,"writeApis":true,"apis":0},"protection":null,"owner":null,"userCounter":0,"teamCounter":0}
Make get request to endpoint  https://platform.42crunch.com/api/v1/collections/64e7de1a-4522-438e-9287-b53a9cea7463/apis
Perform git operations on repo:  xxx_insights_service
Start publishing swagger file:  xxx_open_apis , to collection:  xxx-xxx_insights_service
Determine if api exist:  xxxAPIforPWD_100
Make post request to endpoint  https://platform.42crunch.com/api/v1/apis
Swagger file upload for audit successfully

api-scan

Automation script / workflow for Cloud API Conformance Scan. For example, the script would read the configuration from the 'api-scan-cloud.yaml' file, then itererate through the APIs to perform API conformation scans:

$ api-scan -k $c_key_dev -b ~/apps/xxx/ -y src/conf/api-scan-xxx.yaml -e development
...
Initiate a 42crunch client instance
Loading instance configuration from file:  src/conf/api-scan-xxx.yaml
Retrieve 42c collection list ...
Make get request to endpoint  https://platform.42crunch.com/api/v1/collections
Make get request to endpoint  https://platform.42crunch.com/api/v1/collections/64e7de1a-4522-438e-9287-b53a9cea7463/apis
Start scan api:  xxx_open_apis , in collection:  xxx-xxx_insights_service
Retrieve API id for: xxxAPIforPWD_100
Found:  de69a834-7dd8-4bb4-bd86-bde1be5d9d67
Prepare for API Scan Target:  https://qa.xxx.test.com
Request a valid token for api scan: https://qa.xxx.test.com
Access token found:  xxxxx
Use scan token:  xxxxx
Successfully submitted scan for API: de69a834-7dd8-4bb4-bd86-bde1be5d9d67

api-protect

Automation script / workflow for Cloud API Protection. (TBD)

Unit Test

Unit test are written to ensure the quality of the code. It provides the assurance and sustainability of the project. Use the following command to run the tests:

$ cd crunch-support/
$ python -m unittest xxx tests/

To Do

TBD

crunch-support's People

Contributors

yangsec888 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.