Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump actions/upload-artifact from 3 to 4 #107

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
44d80b7
Bump fastapi from 0.88.0 to 0.89.0
dependabot[bot] Jan 9, 2023
add1537
Merge pull request #7 from Deuchnord/dependabot/pip/main/fastapi-0.89.0
Deuchnord Jan 9, 2023
8703382
Fix compatibility with fastapi 0.89
Jan 10, 2023
45ab987
Simplify method to get message, fix note ID
Jan 10, 2023
ef8f185
Add compatibility for Lemmy (#8)
Deuchnord Jan 11, 2023
81a4c2c
Remove the avatar and header endpoints, use URLs instead in configura…
Deuchnord Jan 11, 2023
7678a46
Bump fastapi from 0.89.0 to 0.89.1 (#10)
dependabot[bot] Jan 11, 2023
42ee933
Update docs: remove avatar and header reference
Jan 11, 2023
da2f587
Add pycln to check imports
Jan 12, 2023
f5b3e7b
Fix imports
Jan 12, 2023
47a5764
Refactor inbox handling (#11)
Deuchnord Jan 12, 2023
84fb800
Fix missing field in database, update the feed correctly after #8 (#14)
Deuchnord Jan 12, 2023
5311f24
Bump requests from 2.28.1 to 2.28.2 (#16)
dependabot[bot] Jan 13, 2023
0da3af5
Comments: save responses to the database (#15)
Deuchnord Jan 23, 2023
ca27587
Bump pycln from 2.1.2 to 2.1.3 (#17)
dependabot[bot] Jan 23, 2023
45b84b9
Bump requests from 2.28.1 to 2.28.2 (#21)
dependabot[bot] Jan 23, 2023
ff7f5e8
Bump pytest from 7.2.0 to 7.2.1 (#20)
dependabot[bot] Jan 23, 2023
49c73dc
Database: test init and upgrade (#22)
Deuchnord Jan 24, 2023
046d510
Add Markdown tests (#23)
Deuchnord Jan 24, 2023
f8f5423
Add webserver tests (#25)
Deuchnord Jan 25, 2023
3dbadef
Comments: support delete event (#24)
Deuchnord Jan 25, 2023
23ef410
Add GitHub Sponsors
Deuchnord Jan 28, 2023
edcdf62
Bump pycryptodome from 3.16.0 to 3.17 (#29)
dependabot[bot] Jan 30, 2023
e831c8a
Bump beautifulsoup4 from 4.11.1 to 4.11.2 (#30)
dependabot[bot] Feb 3, 2023
8d0c520
Add security manual
Feb 4, 2023
f5acea4
Bump docker/build-push-action from 3 to 4 (#31)
dependabot[bot] Feb 6, 2023
5fd1eed
Bump fastapi from 0.89.1 to 0.90.0 (#32)
dependabot[bot] Feb 9, 2023
cb1dd7e
Bump fastapi from 0.90.0 to 0.90.1 (#33)
dependabot[bot] Feb 10, 2023
7b48152
Bump fastapi from 0.90.1 to 0.91.0 (#34)
dependabot[bot] Feb 14, 2023
c39b89a
Bump fastapi from 0.91.0 to 0.92.0 (#35)
dependabot[bot] Feb 14, 2023
1af555f
Bump pydantic from 1.10.4 to 1.10.5 (#36)
dependabot[bot] Feb 17, 2023
b02ee70
Bump pytest from 7.2.1 to 7.2.2 (#38)
dependabot[bot] Mar 6, 2023
32ac8c0
Bump fastapi from 0.92.0 to 0.94.0 (#42)
dependabot[bot] Mar 13, 2023
e8283b3
Bump pydantic from 1.10.5 to 1.10.6 (#40)
dependabot[bot] Mar 13, 2023
6eb67cd
Bump uvicorn from 0.20.0 to 0.21.0 (#41)
dependabot[bot] Mar 13, 2023
8f3dd01
Bump black from 22.12.0 to 23.1.0 (#37)
dependabot[bot] Mar 13, 2023
dfa832c
Bump fastapi from 0.94.0 to 0.94.1 (#43)
dependabot[bot] Mar 14, 2023
86f92e4
Bump fastapi from 0.94.1 to 0.95.0 (#45)
dependabot[bot] Mar 20, 2023
d7d1489
Bump uvicorn from 0.21.0 to 0.21.1 (#44)
dependabot[bot] Mar 20, 2023
54bdb5e
Bump beautifulsoup4 from 4.11.2 to 4.12.0 (#46)
dependabot[bot] Mar 21, 2023
5bea1e7
Bump markdown from 3.4.1 to 3.4.2 (#48)
dependabot[bot] Mar 23, 2023
ea6e239
Bump black from 23.1.0 to 23.3.0 (#50)
dependabot[bot] Mar 29, 2023
b27f16a
Update README.md
Deuchnord Apr 8, 2023
43a834e
Fix issues in the security instructions
Deuchnord Apr 12, 2023
ddd3203
Bump httpx from 0.23.3 to 0.24.0 (#54)
dependabot[bot] Apr 12, 2023
91adcb6
Bump pydantic from 1.10.6 to 1.10.7 (#47)
dependabot[bot] Apr 12, 2023
04ed5c5
Bump pytest from 7.2.2 to 7.3.0 (#53)
dependabot[bot] Apr 12, 2023
874aa65
Bump beautifulsoup4 from 4.12.0 to 4.12.2 (#52)
dependabot[bot] Apr 12, 2023
cc7013e
Bump markdown from 3.4.2 to 3.4.3 (#49)
dependabot[bot] Apr 12, 2023
7102e7c
Bump pytest from 7.3.0 to 7.3.1 (#56)
dependabot[bot] Apr 17, 2023
65d37fe
Bump fastapi from 0.95.0 to 0.95.1 (#55)
dependabot[bot] Apr 19, 2023
856bc7d
Bump requests from 2.28.2 to 2.29.0 (#57)
dependabot[bot] Apr 27, 2023
6a562e0
Bump requests from 2.29.0 to 2.30.0 (#59)
dependabot[bot] May 8, 2023
13b6350
Bump uvicorn from 0.21.1 to 0.22.0 (#58)
dependabot[bot] May 8, 2023
fdfba95
Bump pycryptodome from 3.17 to 3.18.0 (#61)
dependabot[bot] May 22, 2023
3a71d01
Bump httpx from 0.24.0 to 0.24.1 (#62)
dependabot[bot] May 22, 2023
fdac6ae
Bump fastapi from 0.95.1 to 0.95.2 (#60)
dependabot[bot] May 22, 2023
ce86155
Bump fastapi from 0.95.2 to 0.98.0 (#72)
dependabot[bot] Jun 26, 2023
6cfc792
Bump requests from 2.30.0 to 2.31.0 (#63)
dependabot[bot] Jul 10, 2023
29441d6
Bump actions/checkout from 3 to 4 (#90)
dependabot[bot] Oct 13, 2023
d84a417
Bump docker/setup-qemu-action from 2 to 3 (#91)
dependabot[bot] Oct 13, 2023
0508d74
chore(dependabot): remove reviewer
Deuchnord Oct 13, 2023
ea505b4
Bump docker/build-push-action from 4 to 5 (#92)
dependabot[bot] Oct 13, 2023
b119a64
Bump docker/setup-buildx-action from 2 to 3 (#94)
dependabot[bot] Oct 13, 2023
f464606
Bump docker/login-action from 2 to 3 (#93)
dependabot[bot] Oct 13, 2023
fb12355
Bump actions/upload-artifact from 3 to 4
dependabot[bot] Dec 18, 2023
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
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
github: Deuchnord
liberapay: Deuchnord
custom:
- https://www.utip.io/deuchnord
4 changes: 0 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@ updates:
target-branch: main
schedule:
interval: daily
reviewers:
- Deuchnord

- package-ecosystem: github-actions
directory: "/"
open-pull-requests-limit: 5
target-branch: main
schedule:
interval: weekly
reviewers:
- Deuchnord
19 changes: 0 additions & 19 deletions .github/workflows/black.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/docker-unstable-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
push: true
tags: deuchnord/f2ap:unstable
34 changes: 34 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Code quality

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
black:
name: Check code style
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- uses: psf/[email protected]

pycln:
name: Check imports
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- run: |
pip install poetry
poetry install
- run: |
poetry run pycln --check f2ap tests
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
name: Build and release to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -41,19 +41,19 @@ jobs:
echo "patch=$(echo $TAG)" >> $GITHUB_OUTPUT

- name: Setup QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
push: true
tags: |
Expand Down
74 changes: 74 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Tests

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
pytest:
name: Unit tests
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
python_version:
- '3.9'
- '3.10'
- '3.11'

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- run: |
pip install poetry
poetry install
- run: |
poetry run pytest --cov=f2ap tests/*.py

- name: Push code coverage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
COVERALLS_FLAG_NAME: "Py${{ matrix.python_version }}_${{ matrix.os }}"
run: |
python3 -m poetry run coveralls --service=github

# Upload generated artifacts only if tests don't pass, to help debugging.
- name: Upload artifacts
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-files
path: tests/files/

coverage:
name: Push coverage report
needs: pytest
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Prepare Python
uses: actions/setup-python@v4
with:
python-version: "3.x"

- name: Install dependencies
run: |
pip install poetry
poetry install

- name: Upload coverage report
run: |
poetry run coveralls --finish --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
*.toml
!*.dist.toml
*.db
*.bak

!/tests/files/database/upgrade/database-v1.db
.coverage
46 changes: 3 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# ![f2ap](logo.svg)

[![Coverage Status](https://coveralls.io/repos/github/Deuchnord/f2ap/badge.svg?branch=main)](https://coveralls.io/github/Deuchnord/f2ap?branch=main)

f2ap (_Feed to ActivityPub_) is a web application that uses the RSS/Atom feed of your website to expose it on the Fediverse
through ActivityPub.

Expand Down Expand Up @@ -61,49 +63,7 @@ If you run f2ap with Docker, make sure to name it `config.toml` and to place it

### Configuring the server

To provide a better integration to your website, you are encouraged to add some configuration lines to your server.
This will ensure the social applications will correctly discover your website's ActivityPub API.

#### Nginx

Edit your configuration file and add the following lines to your `server` section.
Don't forget to adapt:
- the IP address on the `proxy_pass` lines to match f2ap's configuration;
- the `<username>` part in the last `location` to match the username of your actor.

```nginx
server {
## ...

# Propagate the domain name to f2ap
proxy_set_header Host $host;

# The webfinger allows the social applications to find out that your website serves an ActivityPub API.
location /.well-known/webfinger {
proxy_pass http://127.0.0.1:8000;
}

location / {
# Match any request asking for an ActivityPub content
if ( $http_accept ~ .*application/activity\+json.* ) {
proxy_pass http://127.0.0.1:8000;
}

# Match any request sending an ActivityPub content
if ( $http_content_type = "application/activity+json" ) {
proxy_pass http://127.0.0.1:8000;
}
}

# Exposes the avatar and the header of the profile
# Change the <username> here with the username of the actor you expose (for instance: blog)
location ~ /actors/<username>/(avatar|header) {
proxy_pass http://127.0.0.1:8000;
}

## ...
}
```
See [the dedicated page](https://github.com/Deuchnord/f2ap/wiki/Web-Server-Configuration) on the wiki.

### Limitations

Expand Down
32 changes: 32 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Security Policy

## Supported versions

f2ap versions follow the [semantic versioning](https://semver.org) standard.
Since it is at an early stage of development, its stability is not guaranteed until it reaches the version 1.0.0.
Until then, only the last version is supported for patches.

## How to inform my website visitors about security of f2ap?

If you use f2ap on your website, you can inform your visitors of the procedure to report any vulnerability by adding the following lines in your `/.well-known/security.txt` file:

```
# if you found a vulnerability on the ActivityPub implementation, please read the following document:
Contact: https://github.com/Deuchnord/f2ap/blob/main/SECURITY.md
```

> `/.well-known/security.txt` is a plain text file proposed on [RFC 9116](https://www.rfc-editor.org/rfc/rfc9116) that explains people who find a vulnerability on your website how to report it.
> If you don't have one yet, you should consider creating it with your own information.
> There is [a generator here](https://securitytxt.org) if you need help.

## Reporting a Vulnerability

If you have found a vulnerability on a website that uses f2ap, check first if you can reproduce it in the last public version.
If you can't, the website is most likely using an old version, so you should contact its administrator and tell them they should upgrade.

If you could reproduce on the last version, please don't open an issue directly, and send me an email to [[email protected]](mailto:[email protected]?subject=Vulnerability%20in%20f2ap) with the subject: _"Vulnerability in f2ap"_, and describe the exact nature of the vulnerability.
If you know how to fix the problem, you may attach your email with a Git patch to apply, so the security patch may be published more quickly.

For more security, you are encouraged to encrypt your email with the PGP public key found [here](https://deuchnord.fr/pgp.txt).

Thank you for your time!
8 changes: 6 additions & 2 deletions config.dist.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ update_freq = 5
[actor]
username = "blog"
display_name = "The most perfect blog of the Web"
avatar = "/path/to/avatar.png"
header = "/path/to/header.jpg"
avatar = "https://example.com/images/avatar.png"
header = "https://example.com/images/header.jpg"
summary = "Why make threads when you can have a blog? 👀"

# A list of people you want the actor to follow, in `@[email protected]` format.
Expand Down Expand Up @@ -60,3 +60,7 @@ format = "[{title}]({url})\n{summary}\n{tags}"
# Available formats: camelCase, CamelCase, snake_case
# Default: camelCase
tag_format = "camelCase"

# A list of groups you want to send the message to, additionally to the followers.
# This is required to get the messages discoverable by some social applications like Lemmy.
groups = []
Loading
Loading