Skip to content

Compliance-Bot - A Chatbot That Helps With Mundane Compliance Things

License

Notifications You must be signed in to change notification settings

Convertiv/compliance-bot

Repository files navigation

ComplianceBot - A Chatbot That Helps With Mundane Compliance Things

Oh, hello there. I see you've stumbled upon ComplianceBot, the chatbot designed to perform a task so tiresome and mundane that people just don't bother with it. But don't worry, it's here to help you create compliance access control Jira tickets through Slack, because apparently, we can't get enough of bureaucratic processes.

The chatbot is also designed to perform the thankless task of answering questions about your company's Information Security policy documents. This little bundle of code will indulge you by sifting through the tedious intricacies of your policies, just to add a dash of amusement to your otherwise dreary existence. After all, who wouldn't want to engage in mind-numbing conversations with a chatbot that possesses an uncanny knowledge of bureaucratic minutiae?

Prepare yourself for a thrilling ride through the labyrinth of rules, regulations, and red tape, as ComplianceBot dutifully guides you on this never-ending quest for understanding. If only there were a simpler way...

Features:

  • Jira Integration: ComplianceBot will handle the dreary task of creating compliance Access Control tickets in Jira for you. Lucky you.
  • Slack Integration: Because why not make your life slightly less tedious by talking to a robot on Slack?
  • Interrogation Mode: ComplianceBot will interrogate users to extract every last bit of necessary detail for creating a ticket, much like a digital Spanish Inquisition.
  • Over-Engineered: It's always good to know that you're using a solution that's far more complicated than it needs to be.
  • Powered by LangChain and GPT LLM: It speaks to you using the most advanced language models, ensuring your existential crisis is expressed with the utmost eloquence.
  • Slack Bolt: ComplianceBot uses Slack Bolt to chat with you on Slack, so you can feel marginally less lonely.
  • Motorhead Memory Engine: For storing conversational history, because who wouldn't want a record of these delightful interactions?
  • OpenSearch Sighs: ComplianceBot trudges through OpenSearch for document Q&A, tolerating your queries about your own policy documents.

Requirements

Before you can enjoy the delightful company of ComplianceBot, make sure you meet these prerequisites:

  1. Node version 18.x+: To check your version, run node -v. If needed, update from Node's official website.
  2. Yarn version 3.4.1+: Check your version with yarn -v. Update from Yarn's official website if necessary.
  3. Docker version 20.10.23+: Run docker -v to check your version. Visit Docker's official website for the latest version.

Local Installation

If you're eager to experience the existential dread of conversing with ComplianceBot in your local environment, simply follow these steps:

  1. Clone the repository, because misery loves company.

  2. Create a .env file: Copy the .env.example file as a .env and fill out the variables with your own values. If only we could fill the void in our own existence so easily.

  3. Run yarn install, because one can never have too many dependencies.

  4. Index your documents: Execute yarn run index-documents to prepare ComplianceBot for the soul-crushing task of answering your policy-related questions. (See Indexing section for more details)

  5. Follow that up with yarn run cli to initiate your journey into the abyss of compliance ticket creation.

  6. Finally, run docker compose up to bring up its services. Don't worry, it's as thrilled about this as you are.

Configuring Slack for ComplianceBot

In order to grant ComplianceBot access to your Slack workspace and allow it to spread the joy of policy compliance, you'll need to follow these steps:

  1. Create a Slack App: Visit the Slack API website and sign in to your Slack account. Click "Create New App" and give your app a name that captures the essence of bureaucratic drudgery (e.g., "ComplianceBot"). Choose the Slack workspace where you'd like to develop your app and click "Create App."

  2. Configure Permissions: In the "Add features and functionality" section, click on "OAuth & Permissions." Scroll down to the "Scopes" section and add the necessary bot token scopes for ComplianceBot to function:

    • app_mentions:read: To recognize when it's mentioned in messages.
    • chat:write: To send messages in channels.
    • commands: To create and manage slash commands.
    • users:read: To access user information.

    Save your changes.

  3. Install the App: On the "OAuth & Permissions" page, click the "Install App" button to install ComplianceBot in your Slack workspace. You will be asked to confirm the permissions. Click "Allow" to grant access.

  4. Retrieve the Bot Token: After the installation, you'll be redirected back to the "OAuth & Permissions" page. Copy the "Bot User OAuth Token" (starts with xoxb-) and save it in a secure place. You'll need this token to configure the bot.

  5. Configure Slash Commands: In the "Slash Commands" section of your app's settings, create a new command (e.g., /compliance-ticket) and set the request URL to the endpoint where your ComplianceBot instance is running.

  6. Update ComplianceBot Configuration: Finally, update the ComplianceBot configuration file with your Slack app's "Bot User OAuth Token" and any other necessary details.

And there you have it. Now you can enjoy the relentless tedium of generating compliance Access Control tickets with the assistance of ComplianceBot right in your Slack workspace. Remember, when it comes to compliance, we're all in this endless bureaucratic nightmare together.

Indexing your documents

Before ComplianceBot can shower you with the boundless joys of your company's Information Security policies, you must first provide it with documents containing said policies. Ensure that the documents are in .docx format, as ComplianceBot inexplicably prefers to consume knowledge in a proprietary format.

  1. Deposit your policy documents, like sacrificial offerings, into the data/policies directory.
  2. Ensure your container services are up and running, then run yarn run index-documents.

This will process your policy documents and generate embeddings for them and store the embeddings in an OpenSearch index. This will allow ComplianceBot to search and retrieve relevant information with ease, ensuring that your bureaucratic torment is as efficient as possible.

CLI Usage

If you find yourself craving the monotonous delight of interacting with ComplianceBot but can't bear the thought of using Slack, fear not. You can engage in a thrilling conversation with ComplianceBot directly from the command line, without ever opening Slack, simply run yarn run cli.

License

ComplianceBot is released under the MIT License, giving you the freedom to do whatever your weary heart desires with the code. Modify it, distribute it, stare blankly at it in existential despair – the choice is yours!

About

Compliance-Bot - A Chatbot That Helps With Mundane Compliance Things

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published