Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
1b11a88
Update generator-generic-ossf-slsa3-publish.yml
Sazwanismail Aug 26, 2025
14da5e1
Create utilizing HTML
Sazwanismail Aug 28, 2025
da0f7ed
Update README.md
Sazwanismail Sep 14, 2025
1804d72
Create Fairbase k.cloudworkstations.dev
Sazwanismail Sep 14, 2025
efec254
Create Website sazwan
Sazwanismail Sep 24, 2025
742382e
Sazwan Fairbase
Sazwanismail Sep 24, 2025
7b98b10
Create Portfolio digital
Sazwanismail Oct 9, 2025
cb5a56f
Merge pull request #10 from Sazwanismail/Sazwanismail-patch-port
Sazwanismail Oct 9, 2025
f235868
Implement HTML support with preview and documentation
Sazwanismail Oct 16, 2025
e368991
Merge pull request #11 from Sazwanismail/Sazwanismail-patch-1
Sazwanismail Oct 16, 2025
83811f2
Secure Fairbase
Sazwanismail Oct 17, 2025
ba58ec7
Merge pull request #12 from Sazwanismail/Sazwanismail-patch-2
Sazwanismail Oct 17, 2025
eae46e1
SLSA3 Workflow
Sazwanismail Oct 17, 2025
eb420a6
Merge pull request #13 from Sazwanismail/Sazwanismail-patch-3
Sazwanismail Oct 17, 2025
f01e711
Add Firebase security guidelines for personal projects
Sazwanismail Oct 17, 2025
99a58b8
Merge pull request #14 from Sazwanismail/Sazwanismail-patch-4
Sazwanismail Oct 17, 2025
e39cf37
Add guide for creating personal website on GitHub Pages
Sazwanismail Mar 10, 2026
0ce6523
Merge pull request #17 from Sazwanismail/Sazwanismail-patch-5
Sazwanismail Mar 10, 2026
08e0e7a
Update README header with new emojis
Sazwanismail Mar 11, 2026
a5d3481
Merge pull request #18 from Sazwanismail/Sazwanismail-patch-6
Sazwanismail Mar 11, 2026
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
482 changes: 482 additions & 0 deletions .allai/Html support

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions .devcontainer/Fairbase security personal
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
For your personal project, Firebase Realtime Database is a great choice. The key to security lies almost entirely in properly configuring **Firebase Security Rules** and **Firebase Authentication**, which control access to your data.

Here is a comparison of different security rule configurations for a personal database, from least to most secure:

| Security Level | Authentication Method | Security Rules Example | Best For |
| :--- | :--- | :--- | :--- |
| **Open (Test Mode)** | None | `{ ".read": true, ".write": true }` | Initial development only; **highly insecure** for production. |
| **Authenticated Only** | Firebase Auth (Anonymous or Email/Password) | `{ ".read": "auth != null", ".write": "auth != null" }` | Simple personal projects; basic security. |
| **User-Specific Data** | Firebase Auth (Any method) | `{ "users": { "$uid": { ".read": "$uid === auth.uid", ".write": "$uid === auth.uid" } } }` | **Recommended for personal projects**; users access only their own data. |

### 🔒 Implementing Recommended Security for a Personal Database

For a truly secure personal database, you should implement the "User-Specific Data" model. This involves two main steps:

1. **Set Up Firebase Authentication**
Even for a single-user app, don't skip authentication. It provides a secure way to identify you as the only authorized user.
- **Enable Authentication** in your Firebase console.
- Choose a sign-in method. For personal projects, **Email/Password** or **Anonymous Authentication** are straightforward options.
- Integrate the sign-in flow into your app. Upon successful sign-in, Firebase provides a unique user ID (UID) and an ID token.

2. **Write Strict Security Rules**
Use rules that lock down data access based on the authenticated user's UID. This means you can only read and write data within a path that matches your own user ID.

```json
{
"rules": {
// Users can only access their own node in the 'users' path
"users": {
"$uid": {
".read": "$uid === auth.uid",
".write": "$uid === auth.uid"
}
},
// A separate, public data section if needed
"public_data": {
".read": true,
".write": "auth != null" // Or restrict to your UID for writing
}
}
}
```
In this structure, you would store your personal data under a path like `users/your_unique_user_id/your_data`.

### 🚨 Critical Security Practices to Follow

- **Never Use Public Rules in Production**: The default public rules are a major security risk. Anyone who guesses your project's configuration details can steal or delete all your data.
- **Structure Data for Security**: Design your database structure with security rules in mind from the start. It's much harder to secure a poorly structured database later.
- **Validate Input in Rules**: You can add conditions to ensure data being written meets certain criteria (e.g., has the correct fields, is of the right data type).

### 📚 Additional Security Layers

For enhanced protection, consider these Firebase features:
- **App Check**: This helps protect your database from abuse by ensuring that requests originate from your official app, adding another layer of defense.
- **Regular Audits**: Periodically check the "Firebase Console > Realtime Database > Rules" section to review and test your rules.

By combining **Firebase Authentication** with **user-specific Security Rules**, you can create a robust and secure personal database. If you'd like to explore a specific use case, feel free to ask
Loading