Skip to content
Closed
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
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
name: Lint, Test & Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run lint
run: npm run lint

- name: Run unit tests
run: npm test

- name: Build extension packages
run: npm run build
44 changes: 10 additions & 34 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ name: "CodeQL"

on:
push:
branches: [master, ]
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
schedule:
- cron: '0 14 * * 3'
Expand All @@ -13,43 +12,20 @@ jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
uses: github/codeql-action/init@v3
with:
languages: javascript

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v3
171 changes: 39 additions & 132 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,155 +1,62 @@
____ __ ____
/ __ \____ _____ ____/ /_ ____ / / /_
/ /_/ / __ `/ ___/ ___/ __ \/ __ \/ / __/
/ ____/ /_/ (__ |__ ) /_/ / /_/ / / /_
/_/ \__,_/____/____/_.___/\____/_/\__/
<p align="center">
<img src="https://raw.githubusercontent.com/haspr-dev/.github/main/assets/haspr-logo.svg" alt="Haspr logo" width="160" height="160" />
</p>

Open source password manager for teams
(c) 2026 Passbolt SA
https://www.passbolt.com
<h1 align="center">haspr-browser-extension</h1>

## License
<p align="center">
<strong>Browser extension (Firefox, Chrome, Edge) for the Haspr ecosystem, compatible with Passbolt.</strong>
</p>

Passbolt - Open source password manager for teams
<p align="center">
<a href="https://github.com/haspr-dev/haspr-browser-extension/blob/master/LICENSE.txt"><img src="https://img.shields.io/github/license/haspr-dev/haspr-browser-extension" alt="License" /></a>
<a href="https://github.com/haspr-dev/haspr-api"><img src="https://img.shields.io/badge/API-haspr--api-256af2?style=flat-square" alt="API" /></a>
<a href="https://github.com/haspr-dev/go-pbolt-cli"><img src="https://img.shields.io/badge/CLI-go--pbolt--cli-0bddec?style=flat-square&logo=go" alt="CLI" /></a>
</p>

(c) 2026 Passbolt SA
---

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
Public License (AGPL) as published by the Free Software Foundation version 3.
## ⚡ Overview

The name "Passbolt" is a registered trademark of Passbolt SA, and Passbolt SA hereby declines to grant a trademark
license to "Passbolt" pursuant to the GNU Affero General Public License version 3 Section 7(e), without a separate
agreement with Passbolt SA.
The **Haspr browser extension** delivers seamless cryptographic password management, quick access, autofill, and native messaging integration with `go-pbolt-cli` and background credential agents.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See GNU Affero General Public License for more details.
---

You should have received a copy of the GNU Affero General Public License along with this program. If not,
see [GNU Affero General Public License v3](http://www.gnu.org/licenses/agpl-3.0.html).
## ⚖️ Trademark Notice

## About passbolt
*Passbolt is a registered trademark of Passbolt SA. **Haspr** is an independent community project and is not affiliated with, endorsed by, or sponsored by Passbolt SA.*

Passbolt is an open source password manager for teams. It allows to securely share and store credentials.
For instance, the wifi password of your office, or the administrator password of a router, or your organisation social
media account password, all of them can be secured using Passbolt.
---

You can try a demo of passbolt at [https://demo.passbolt.com](https://demo.passbolt.com).
## 🛠️ Development & Building

You will need to install a plugin, you can find a step by step guide in the website
[help section](https://www.passbolt.com/help/start/firefox)
### Prerequisites
- Node.js >= 22.14.0
- npm >= 10.9.2

Or, of course, you can use the code in this repository to build it yourself and run it!

## About passbolt browser extension

A browser extension is needed to maintain a higher level of security, e.g. to ensure the integrity of the
cryptographic code and provide a secure random number generator. In the future it will also be used to provide feature
such as auto filling your passwords when visiting known websites.

### How does it look like?

[![Login](https://raw.githubusercontent.com/passbolt/passbolt_styleguide/master/src/img/screenshots/teaser-screenshot-login-275.png)](https://raw.githubusercontent.com/passbolt/passbolt_styleguide/master/src/img/screenshots/teaser-screenshot-login.png)
[![Browse passwords](https://raw.githubusercontent.com/passbolt/passbolt_styleguide/master/src/img/screenshots/teaser-screenshot4-275.png)](https://raw.githubusercontent.com/passbolt/passbolt_styleguide/master/src/img/screenshots/teaser-screenshot4.png)
[![Share passwords](https://raw.githubusercontent.com/passbolt/passbolt_styleguide/master/src/img/screenshots/teaser-screenshot-share-275.png)](https://raw.githubusercontent.com/passbolt/passbolt_styleguide/master/src/img/screenshots/teaser-screenshot-share.png)

# Contributing

Please check [CONTRIBUTING.md](CONTRIBUTING.md) for more information about how to get involved.

## Reporting a security Issue

If you've found a security related issue in Passbolt, please don't open an issue on GitHub. Follow our responsible disclosure process: https://www.passbolt.com/docs/contribute/security/vulnerability/.

# Quick how-to for developers

This is just a quick getting started guide, for more information and productivity tips checkout CONTRIBUTING.md

## Prerequisite

You will need ```node```, ```grunt``` and the dependencies listed in ```packages.json```.
```
git clone git@github.com:passbolt/passbolt_browser_extension.git
cd passbolt_browser_extension
```bash
git clone git@github.com:haspr-dev/haspr-browser-extension.git
cd haspr-browser-extension
npm ci
```

For convenience you can also install ```web-ext``` (for firefox), ```crx``` (for chrome) globally,
otherwise can can be found in ```node_modules```.
```
sudo npm install web-ext -g
sudo npm install crx -g
```

## Quick bundling the build/all source
### Build Commands
```bash
# Build all web-accessible bundles
npm run build

The non-minified source code is located in ```/src```. It can be 'bundled' ```to build/all``` as follow:
```
grunt
# Run unit tests
npm test
```

In order to rebuild the code in this directory automatically while you are editing the src
you can use the grunt watch task:
```
grunt watch
```
### Loading the Unpacked Extension
- **Firefox**: Open `about:debugging#/runtime/this-firefox`, click "Load Temporary Add-on", and select `build/all/manifest.json`.
- **Chrome / Brave / Edge**: Open `chrome://extensions/`, enable "Developer mode", click "Load unpacked", and select `build/all`.

## Test a local version of the plugin
### Firefox

To launch an instance of Firefox with your local version of the add-on installed.
```
cd build/all
web-ext run
```

This instance will be reloaded everytime there is a change in the /build/all code or by pressing the ```r```
key on the keyboard when web-ext is running.
You can debug the application script by opening the
[browser console](https://developer.mozilla.org/en/docs/Tools/Browser_Console).

### Chrome

Go to the the extension page at [chrome://extensions/](chrome://extensions/) click on the
'load unpacked extension' button. Point to your build/all directory and you are good to go.
You debug the application script by clicking on index.html in "inspect views".

## Packaging the application

You can build the crx or xpi (zip) packages using the following command.
```
grunt build
```
The build can be found under ```dist/chromium-mv3``` or ```dist/chromium-mv2``` or ```dist/firefox```.

## Updating the vendors or the styleguide

You can update the vendors or the styleguide in the ```package.json``` and run the copy task
in grunt to deploy them in the appropriate places. Check the ```Gruntfile.js```
for more information.
```
npm update
grunt copy:vendors
grunt copy:styleguide
```
The build can be found under ```dist/chromium-mv3``` or ```dist/chromium-mv2``` or ```dist/firefox```.

## Unit testing

Unit testing is handle by Jest. It provides ways to run them and also build code coverage reports.

To run unit tests:
```
grunt test
```

To run unit tests with coverage:
```
grunt test-coverage
```
---

Once the code coverage report is generated you can find the result in the folder `coverage`.
Jest also provides an HTML version of the reports avaiable at `coverage/lcov-report/index.html`.
## 📄 License

# Credits
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License (AGPL) as published by the Free Software Foundation version 3.

https://www.passbolt.com/credits
See [LICENSE.txt](LICENSE.txt) for details.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class OpenSafariSettingsController: AbstractController {
required init() {}

func run(_ context: NSExtensionContext, _ payload: [String: Any], profileUUID: String) throws -> Void {
SFSafariApplication.showPreferencesForExtension(withIdentifier: "com.passbolt.safari.Extension") { error in
SFSafariApplication.showPreferencesForExtension(withIdentifier: "dev.haspr.safari.Extension") { error in
if let error = error {
self.respondAsError(context, locatedNSError(
domain: "OpenSafariSettingsController",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@
GENERATE_INFOPLIST_FILE = YES;
MACOSX_DEPLOYMENT_TARGET = 15.6;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.passbolt.safari.Extension-Tests.Passbolt-Extension-Tests";
PRODUCT_BUNDLE_IDENTIFIER = "dev.haspr.safari.Extension-Tests.Passbolt-Extension-Tests";
PRODUCT_NAME = "$(TARGET_NAME)";
STRING_CATALOG_GENERATE_SYMBOLS = NO;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
Expand All @@ -455,7 +455,7 @@
GENERATE_INFOPLIST_FILE = YES;
MACOSX_DEPLOYMENT_TARGET = 15.6;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.passbolt.safari.Extension-Tests.Passbolt-Extension-Tests";
PRODUCT_BUNDLE_IDENTIFIER = "dev.haspr.safari.Extension-Tests.Passbolt-Extension-Tests";
PRODUCT_NAME = "$(TARGET_NAME)";
STRING_CATALOG_GENERATE_SYMBOLS = NO;
SWIFT_APPROACHABLE_CONCURRENCY = YES;
Expand Down Expand Up @@ -625,7 +625,7 @@
"-framework",
SafariServices,
);
PRODUCT_BUNDLE_IDENTIFIER = com.passbolt.safari.Extension;
PRODUCT_BUNDLE_IDENTIFIER = dev.haspr.safari.Extension;
PRODUCT_NAME = "$(TARGET_NAME)";
REGISTER_APP_GROUPS = YES;
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -671,7 +671,7 @@
"-framework",
SafariServices,
);
PRODUCT_BUNDLE_IDENTIFIER = com.passbolt.safari.Extension;
PRODUCT_BUNDLE_IDENTIFIER = dev.haspr.safari.Extension;
PRODUCT_NAME = "$(TARGET_NAME)";
REGISTER_APP_GROUPS = YES;
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -723,7 +723,7 @@
"-framework",
WebKit,
);
PRODUCT_BUNDLE_IDENTIFIER = com.passbolt.safari;
PRODUCT_BUNDLE_IDENTIFIER = dev.haspr.safari;
PRODUCT_NAME = "[DEBUG] $(TARGET_NAME)";
REGISTER_APP_GROUPS = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
Expand Down Expand Up @@ -774,7 +774,7 @@
"-framework",
WebKit,
);
PRODUCT_BUNDLE_IDENTIFIER = com.passbolt.safari;
PRODUCT_BUNDLE_IDENTIFIER = dev.haspr.safari;
PRODUCT_NAME = "$(TARGET_NAME)";
REGISTER_APP_GROUPS = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import Cocoa
import SafariServices
import WebKit

let extensionBundleIdentifier = "com.passbolt.safari.Extension"
let extensionBundleIdentifier = "dev.haspr.safari.Extension"

class ViewController: NSViewController, WKNavigationDelegate, WKScriptMessageHandler {

Expand Down
Loading