Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .env.sample

This file was deleted.

2 changes: 0 additions & 2 deletions .secrets.sample

This file was deleted.

35 changes: 7 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,34 +152,9 @@ See [cloudflare-worker/README.md](cloudflare-worker/README.md) for setup instruc
### Prerequisites

- Python 3.10+
- [Poetry](https://python-poetry.org/docs/#installation) for dependency management
- [Wrangler CLI](https://developers.cloudflare.com/workers/wrangler/install-and-update/) for Cloudflare Workers
- Slack Bot Token and Signing Secret

### Installation

1. **Clone the repository**
```bash
git clone https://github.com/OWASP-BLT/BLT-Lettuce.git
cd BLT-Lettuce
```

2. **Install dependencies**
```bash
poetry install
```

3. **Set up environment variables**
```bash
cp .env.sample .env
# Edit .env with your Slack credentials
```

4. **Run locally**
```bash
poetry run python app.py
```

### Deploy Cloudflare Worker

```bash
Expand All @@ -198,18 +173,22 @@ wrangler deploy

```
BLT-Lettuce/
├── app.py # Main Flask application
├── cloudflare-worker/ # Cloudflare Worker code
│ ├── worker.py # Python worker implementation
│ ├── welcome_message.txt # Welcome message template
│ ├── wrangler.toml # Worker configuration
│ └── README.md # Worker documentation
├── data/
│ ├── projects.json # OWASP project metadata cache
│ └── repos.json # Repository categorization
│ ├── repos.json # Repository categorization
│ └── stats.json # Bot statistics
├── docs/
│ └── index.html # GitHub Pages dashboard
├── src/lettuce/ # Bot plugins and modules
├── scripts/
│ ├── requirements.txt # Script dependencies
│ └── scrape_stats.py # Stats scraper script
├── tests/ # Test suite
├── welcome_message.txt # Welcome message source
├── pyproject.toml # Poetry configuration
└── README.md # This file
```
Expand Down
152 changes: 0 additions & 152 deletions app.py

This file was deleted.

24 changes: 24 additions & 0 deletions cloudflare-worker/welcome_message.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
:tada: *Welcome to the OWASP Slack Community, <@{user_id}>!* :tada:

We're thrilled to have you here! Whether you're new to OWASP or a long-time contributor, this Slack workspace is the perfect place to connect, collaborate, and stay informed about all things OWASP.

:small_blue_diamond: *Get Involved:*
• Check out the *#contribute* channel to find ways to get involved with OWASP projects and initiatives.
• Explore individual project channels, which are named *#project-name*, to dive into specific projects that interest you.
• Join our chapter channels, named *#chapter-name*, to connect with local OWASP members in your area.

:small_blue_diamond: *Stay Updated:*
• Visit *#newsroom* for the latest updates and announcements.
• Follow *#external-activities* for news about OWASP's engagement with the wider security community.

:small_blue_diamond: *Connect and Learn:*
• *#jobs*: Looking for new opportunities? Check out the latest job postings here.
• *#leaders*: Connect with OWASP leaders and stay informed about leadership activities.
• *#project-committee*: Engage with the committee overseeing OWASP projects.
• *#gsoc*: Stay updated on Google Summer of Code initiatives.
• *#github-admins*: Get support and discuss issues related to OWASP's GitHub repositories.
• *#learning*: Share and find resources to expand your knowledge in the field of application security.

We're excited to see the amazing contributions you'll make. If you have any questions or need assistance, don't hesitate to ask. Let's work together to make software security visible and improve the security of the software we all rely on.

Welcome aboard! :rocket:
43 changes: 9 additions & 34 deletions cloudflare-worker/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import hmac
import json
from datetime import datetime, timezone
from pathlib import Path

from js import Response, fetch

Expand All @@ -21,40 +22,14 @@ def get_utc_now():
return datetime.now(timezone.utc).isoformat()


WELCOME_MESSAGE = (
":tada: *Welcome to the OWASP Slack Community, <@{user_id}>!* :tada:\n\n"
"We're thrilled to have you here! Whether you're new to OWASP or a "
"long-time contributor, this Slack workspace is the perfect place to "
"connect, collaborate, and stay informed about all things OWASP.\n\n"
":small_blue_diamond: *Get Involved:*\n"
"• Check out the *#contribute* channel to find ways to get involved "
"with OWASP projects and initiatives.\n"
"• Explore individual project channels, which are named *#project-name*, "
"to dive into specific projects that interest you.\n"
"• Join our chapter channels, named *#chapter-name*, to connect with "
"local OWASP members in your area.\n\n"
":small_blue_diamond: *Stay Updated:*\n"
"• Visit *#newsroom* for the latest updates and announcements.\n"
"• Follow *#external-activities* for news about OWASP's engagement "
"with the wider security community.\n\n"
":small_blue_diamond: *Connect and Learn:*\n"
"• *#jobs*: Looking for new opportunities? Check out the latest "
"job postings here.\n"
"• *#leaders*: Connect with OWASP leaders and stay informed about "
"leadership activities.\n"
"• *#project-committee*: Engage with the committee overseeing "
"OWASP projects.\n"
"• *#gsoc*: Stay updated on Google Summer of Code initiatives.\n"
"• *#github-admins*: Get support and discuss issues related to "
"OWASP's GitHub repositories.\n"
"• *#learning*: Share and find resources to expand your knowledge "
"in the field of application security.\n\n"
"We're excited to see the amazing contributions you'll make. If you "
"have any questions or need assistance, don't hesitate to ask. Let's "
"work together to make software security visible and improve the "
"security of the software we all rely on.\n\n"
"Welcome aboard! :rocket:"
)
def load_welcome_message():
"""Load the welcome message from the text file."""
welcome_file = Path(__file__).parent / "welcome_message.txt"
return welcome_file.read_text(encoding="utf-8")


# Load welcome message from file
WELCOME_MESSAGE = load_welcome_message()


async def get_stats(env):
Expand Down
31 changes: 0 additions & 31 deletions manifest.yaml

This file was deleted.

Loading