feat(docs): Add visit tracking - #280
Closed
muscariello wants to merge 5 commits into
Closed
Conversation
- Add secure visit tracker using GitHub Issues API - Implement GitHub Actions workflows for processing visits - Add CLI test scripts for validation (test-tracking-*.sh) - Add browser automation test (test-tracking.js) - Update Taskfile with 'task test:tracking' command - Include visit tracker script in MkDocs configuration The tracking system: - Collects page visit data in localStorage - Submits via GitHub Issues (no tokens exposed) - Processes with GitHub Actions - Respects privacy (Do Not Track, localhost disabled) - Includes comprehensive testing suite Signed-off-by: Luca Muscariello <muscariello@ieee.org>
2 tasks
muscariello
requested review from
jubarbot-cisco
and removed request for
a team and
jubarbot-cisco
October 13, 2025 13:59
Only keep process-visits-secure.yml which uses GitHub secrets for secure gist access. Signed-off-by: Luca Muscariello <muscariello@ieee.org>
ramizpolic
reviewed
Oct 13, 2025
Test scripts moved to local-only usage: - Removed test-tracking-simple.sh - Removed test-tracking-flow.sh - Removed test-tracking.js - Removed test:tracking tasks from Taskfile - Reverted .gitignore changes These scripts remain available locally for manual testing. Signed-off-by: Luca Muscariello <muscariello@ieee.org>
muscariello
marked this pull request as draft
October 13, 2025 15:11
Add secure validation layer to prevent malicious data submission: - New validation script (validate_visit_data.py): * Size limits: 1MB max issue, 100 visits per issue * Field whitelisting and type validation * Path traversal prevention (no .. or ~) * Safe character sets for all fields * ISO timestamp validation * Domain validation for referrers - Updated workflow (process-visits-secure.yml): * Validates all data before processing * Auto-closes invalid issues with explanation * Only processes data after validation success * Proper error handling and logging Security protections: - Prevents code injection attacks - Blocks path traversal attempts - Mitigates XSS via character whitelisting - DoS protection via size limits - No shell command execution of user data Signed-off-by: Luca Muscariello <muscariello@ieee.org>
Member
Author
|
Check this flow @ramizpolic |
Remove test:tracking tasks from Taskfile.yml: - test:tracking - test:tracking:setup - test:tracking:flow Revert .gitignore changes: - Remove node_modules entry - Remove package-lock.json entry These were part of the test scripts that have been moved to local-only usage. Signed-off-by: Luca Muscariello <muscariello@ieee.org>
Member
Author
|
We keep this on hold as a user must be authenticated in github to post. This is not always true and when true it does not work for privacy issues. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a privacy-first visit tracking system for docs.agntcy.org.
Changes
Core Implementation
docs/javascripts/visit-tracker-secure.js): Secure client-side tracking using GitHub Issues APIprocess-visits-secure.yml): Secure workflow for processing visit data using GitHub secretsprocess_visits.py): Python script to process and store visit data in gistConfiguration
mkdocs.ymlto include tracking scriptFeatures
✅ Privacy First
✅ Secure Architecture
✅ Developer Friendly
.github/How It Works
Security
Related Issue
Closes #279