The Problem
If you work in a company , they are many reason to access different websites. But sometimes maybe you need permissions from security teams to access these websites, or maybe sometimes you have to wait for 2 days to get this approved.
Solution : Reduce the wait time and support tickets
As a developer you like CLI
tools because its quick. SecureCLI
tool helps you to check if the website is secure or not by just typing simple command like below:
secure https://cloud.mongodb.com/
Secure CLI Demo in GIF :)
Submission Category:
Automation Innovation :
Here we have automated
the security teams job, instead of taking time to approving multiple support tickets , create a DB of approved links in Mongo DB :)
The Mongo Collection
The API Behind the CLI
Link to Code
This repo is related to a CLI App created for MongoDb and Dev.to Hackathon :)
Prerequisites
-
Install .NET Core 5.0 SDK : https://dotnet.microsoft.com/en-us/download/dotnet/5.0
-
Create you own Mongo DB Atlas FREE account, and create required DB and Collection : https://cloud.mongodb.com/
-
Add below sample documents inside your collection:
{ "_id": { "$oid": "auto_generated_id" }, "link": "https://cloud.mongodb.com/", "isSecure": true } { "_id": { "$oid": "auto_generated_id" }, "link": "https://dev.to/", "isSecure": true } { "_id": { "$oid": "auto_generated_id" }, "link": "https://www.exampleunsecuresite.com/", "isSecure": false }
-
Open the SearchSecureAPIController.cs file under Secure Cli API project and add all related config for Mongo DB Atlas like: Connection string, DB Name, Collection Name.
Steps to Run the Secure Cli API
1. Open the command prompt into folder SecureCliAPI
2. Type dotnet restore
3. Type dotnet build
4. Type dotnet run
5. Let this API
be in running mode
Steps to Run the Secure Cli App
1. Open the command…
Additional Resources / Info
- https://www.mongodb.com/languages/how-to-use-mongodb-with-dotnet
- How to create your own .NET CLI tools to make your life easier - YouTube · Nick Chapsas
- https://docs.microsoft.com/en-us/dotnet/core/tools/global-tools-how-to-create
Was busy but still I did this project in less time, So feel free open issues in github if you face any problem running the projects.
Future Plans:
- Create a back end with
UI
for security teams add or remove links - Make the
CLI
respond like a chat bot - Add options to check mail domains
- Do the above as time permits :)
I enjoyed building a custom CLI
. Thanks Mondodb and devto .
Top comments (0)