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

Add I,librarian free app to Appstore #5403

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 8 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
21 changes: 21 additions & 0 deletions apps/i-librarian/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "../schema.json",
"name": "i-librarian",
"available": true,
"exposable": true,
"dynamic_config": true,
"port": 31547,
"id": "i-librarian",
"tipi_version": 1,
"version": "v5.11.1",
"categories": ["data"],
"description": "I, Librarian is an online service that will organize your collection of PDF papers and office documents. It provides a lot of extra features for students and research groups both in industry and academia. It is a reference manager, PDF manager and organizer focused on private group collaboration.",
"short_desc": "I-Librarian",
"author": "Scilico",
"source": "https://github.com/mkucej/i-librarian-free",
"form_fields": [],
"website": "https://i-librarian.net/",
"supported_architectures": ["amd64"],
"created_at": 1730663152,
"updated_at": 1730663152
}
36 changes: 36 additions & 0 deletions apps/i-librarian/docker-compose.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"services": [
{
"name": "i-librarian",
"image": "cgrima/i-librarian:latest",
"isMain": true,
"internalPort": 80,
Comment on lines +4 to +7
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Based on the gathered information, I can now provide the final response:

Using unofficial Docker image poses stability and security risks

The current configuration uses an unofficial Docker image (cgrima/i-librarian:latest) while I, Librarian's official repository doesn't provide or recommend any specific Docker image. Instead, it recommends a direct installation with Apache 2.4+ and PHP 7.2+ requirements.

Consider:

  1. Creating a verified Docker image based on the official source code (https://github.com/mkucej/i-librarian-free)
  2. Document the build process and version compatibility
  3. Ensure the image meets the official requirements (Apache 2.4+, PHP 7.2+)
🔗 Analysis chain

Consider using a specific version tag instead of 'latest'.

Using the latest tag in production can lead to unexpected breaking changes during container updates. Additionally, the image is from a personal Docker Hub account which might pose maintenance and security risks.

Consider:

  1. Pin to a specific version tag for better stability and predictability
  2. Verify if an official image is available
  3. Document the process for version updates

Let me try a different approach to verify the image and its tags.

This will help us understand:

  1. If there's any documentation about the chosen image and version
  2. The rationale behind using this specific image
  3. Any version requirements or constraints mentioned in the documentation

Let me check the official repository mentioned in the description to understand the recommended deployment approach.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check available tags for the i-librarian image and its pull statistics
# to help assess its stability and adoption

# Get image tags and their creation dates
docker_user="cgrima"
repo="i-librarian"
curl -s "https://hub.docker.com/v2/repositories/${docker_user}/${repo}/tags?page_size=100" | jq -r '.results[] | "\(.name) (Last Updated: \(.last_updated))"'

Length of output: 744


Script:

#!/bin/bash
# Let's check if there's any documentation or references about the image
rg -i "i-librarian" -g "!*.{json,lock}" -A 3 -B 3

# Also check for any README or documentation in the app directory
fd README -t f --exec cat {} \; apps/i-librarian/

Length of output: 1227


Script:

#!/bin/bash
# Check if there are any version-specific requirements or recommendations
curl -s "https://raw.githubusercontent.com/mkucej/i-librarian-free/master/README.md"

# Let's also check if there are any other instances of this image being used in the codebase
rg "cgrima/i-librarian" -g "*.{yml,yaml,json}" --type-add 'docker:*.{dockerfile,Dockerfile}' -t docker

Length of output: 3546

"volumes": [
{
"hostPath": "${APP_DATA_DIR}/data/i-librarian",
"containerPath": "/app/data",
"readOnly": false
},
{
"hostPath": "/etc/localtime",
"containerPath": "/etc/localtime",
"readOnly": true
}
],
"addPorts": [
{
"containerPort": 80,
"hostPort": 31547,
"tcp": true
}
],
"healthCheck": {
"test": "curl --fail http://localhost || exit 1",
"retries": 3,
"interval": "30s",
"timeout": "10s"
}
}

]
}
39 changes: 39 additions & 0 deletions apps/i-librarian/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
services:
i-librarian:
container_name: i-librarian
image: cgrima/i-librarian:latest
privileged: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Security concern: Untrusted image source and privileged mode

Two critical security issues:

  1. The image cgrima/i-librarian:latest is from a personal Docker Hub account rather than an official source
  2. The container runs in privileged mode, which grants extensive host system access

Consider these changes:

  1. Use an official image if available, or verify and document the trust level of this image
  2. Remove privileged mode unless absolutely necessary. If specific capabilities are needed, use cap_add instead:
-    privileged: true
+    # Add only required capabilities if needed
+    cap_add:
+      - specific_capability

Committable suggestion skipped: line range outside the PR's diff.

restart: unless-stopped
ports:
- ${APP_PORT}:80
volumes:
- ${APP_DATA_DIR}:/app/data
- /etc/localtime:/etc/localtime:ro
viktor-c marked this conversation as resolved.
Show resolved Hide resolved
networks:
- tipi_main_network
labels:
# Main
traefik.enable: true
traefik.http.middlewares.ilibrarian-web-redirect.redirectscheme.scheme: https
traefik.http.services.ilibrarian.loadbalancer.server.port: 80
# Web
traefik.http.routers.ilibrarian-insecure.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.ilibrarian-insecure.entrypoints: web
traefik.http.routers.ilibrarian-insecure.service: ilibrarian
traefik.http.routers.ilibrarian-insecure.middlewares: ilibrarian-web-redirect
# Websecure
traefik.http.routers.ilibrarian.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.ilibrarian.entrypoints: websecure
traefik.http.routers.ilibrarian.service: ilibrarian
traefik.http.routers.ilibrarian.tls.certresolver: myresolver
# Local domain
traefik.http.routers.ilibrarian-local-insecure.rule: Host(`ilibrarian.${LOCAL_DOMAIN}`)
traefik.http.routers.ilibrarian-local-insecure.entrypoints: web
traefik.http.routers.ilibrarian-local-insecure.service: ilibrarian
traefik.http.routers.ilibrarian-local-insecure.middlewares: ilibrarian-web-redirect
# Local domain secure
traefik.http.routers.ilibrarian-local.rule: Host(`ilibrarian.${LOCAL_DOMAIN}`)
traefik.http.routers.ilibrarian-local.entrypoints: websecure
traefik.http.routers.ilibrarian-local.service: ilibrarian
traefik.http.routers.ilibrarian-local.tls: true
runtipi.managed: true
43 changes: 43 additions & 0 deletions apps/i-librarian/metadata/description.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# I, Librarian
I, Librarian is an online service that will organize your collection of PDF papers and office documents. It provides a lot of extra features for students and research groups both in industry and academia. It is a reference manager, PDF manager and organizer focused on private group collaboration.

## I, Librarian free
https://github.com/mkucej/i-librarian-free

## Why should you use I, Librarian?
### Centralized management
Never loose a document. PDFs are stored and administered at a central location. There is no need to synchronize different devices. All users work with one library in real time.
### Great for remote work
Access your library over the Internet from anywhere. However, restricted access is also possible. Your users only need a web browser. No need to install and upgrade software.
### Powerful full-text search
Search for terms or phrases in metadata, PDF files, PDF annotations, and rich-text notes. A precise OCR is also available. Both the search and OCR are multilingual.
### Private collaboration
Users can create ad hoc projects for more focused work, share notes, PDF annotations, and engage in discussions.
### Annotate PDFs in a web browser
Use a full-featured PDF viewer with a multicolor marker and shared sticky notes directly in a web browser.
### No customer lock-in
You can use I, Librarian as online service or on your premises. Libraries can be easily migrated at any time.

## I, Librarian is used by professionals in many organizations
Note: A listing of an organization does not represent their official endorsement of our services.
UT Southwestern Medical Center
Hart Crowser, Inc
Frontier Medicines Corporation
CNRS
Schrödinger
Aeonyx Research Corporation
YESAB
Admedes GmbH
Nkarta, Inc.
DNO North Sea
NiKang Therapeutics, Inc.
University of Illinois at Chicago
Federal University of Santa Catarina
Sensirion AG
Technischen Universität Wien
Global Ore Discovery
Saarland University
Principia Biopharma

## Copyright
Copyright. © 2001-2024 · [Scilico](http://scilico.com/), LLC · Biglerville, PA, USA
Binary file added apps/i-librarian/metadata/logo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.