Skip to content
Merged
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
39 changes: 26 additions & 13 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
# Dependency review needs the dependency graph, which private repositories only get with
# GitHub Code Security. While unsupported, the review is skipped (reported as skipped, never as passed).
# Dependency review needs the repository's dependency graph to be enabled (private repositories also
# need GitHub Code Security). This job calls the same compare endpoint the action uses; while it is
# unavailable (HTTP 403/404) the review is skipped (reported as skipped, never as passed).
dependency-review-support:
name: Check dependency review support
if: github.event_name == 'pull_request'
Expand All @@ -26,21 +27,33 @@ jobs:
outputs:
enabled: ${{ steps.check.outputs.enabled }}
steps:
- name: Check repository visibility
- name: Probe the dependency graph API
id: check
env:
GH_TOKEN: ${{ github.token }}
OVERRIDE: ${{ vars.DEPENDENCY_REVIEW_ENABLED }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
visibility=$(gh api "repos/$GITHUB_REPOSITORY" --jq .visibility)
if [ "$visibility" = "public" ] || [ "$OVERRIDE" = "true" ]; then
echo "enabled=true" >> "$GITHUB_OUTPUT"
else
echo "enabled=false" >> "$GITHUB_OUTPUT"
msg="Dependency review was NOT run: the dependency graph API is unavailable on this $visibility repository. Make the repository public, or enable GitHub Code Security and set the repository variable DEPENDENCY_REVIEW_ENABLED=true."
echo "::warning title=Dependency review skipped::$msg"
printf '### Dependency review not run\n\n%s\n' "$msg" >> "$GITHUB_STEP_SUMMARY"
fi
code=$(curl -sS -o /dev/null -w '%{http_code}' \
-H "Authorization: Bearer $GH_TOKEN" \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/dependency-graph/compare/$BASE_SHA...$HEAD_SHA")
case "$code" in
200)
echo "enabled=true" >> "$GITHUB_OUTPUT"
;;
403|404)
echo "enabled=false" >> "$GITHUB_OUTPUT"
msg="Dependency review was NOT run: the dependency graph API returned HTTP $code. Enable the dependency graph in the repository's security settings (private repositories also need GitHub Code Security)."
echo "::warning title=Dependency review skipped::$msg"
printf '### Dependency review not run\n\n%s\n' "$msg" >> "$GITHUB_STEP_SUMMARY"
;;
*)
echo "::error title=Dependency graph probe failed::Unexpected HTTP $code from the dependency graph API."
exit 1
;;
esac

dependency-review:
name: Dependency review
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@

<br/>

[![Watch: demo video](https://img.shields.io/badge/watch-demo_video-ff0000?style=for-the-badge&logo=youtube&logoColor=white&labelColor=0b1322)](https://youtu.be/wi9gg9Cik7Y)
[![Devpost: submission](https://img.shields.io/badge/devpost-submission-003e54?style=for-the-badge&logo=devpost&logoColor=white&labelColor=0b1322)](https://devpost.com/software/forebear)
<br/>
[![Backend](https://github.com/Asembris/Forebear/actions/workflows/backend.yml/badge.svg)](https://github.com/Asembris/Forebear/actions/workflows/backend.yml)
[![Frontend](https://github.com/Asembris/Forebear/actions/workflows/frontend.yml/badge.svg)](https://github.com/Asembris/Forebear/actions/workflows/frontend.yml)
[![Security](https://github.com/Asembris/Forebear/actions/workflows/security.yml/badge.svg)](https://github.com/Asembris/Forebear/actions/workflows/security.yml)
[![Hygiene](https://github.com/Asembris/Forebear/actions/workflows/hygiene.yml/badge.svg)](https://github.com/Asembris/Forebear/actions/workflows/hygiene.yml)
[![CodeQL](https://github.com/Asembris/Forebear/actions/workflows/codeql.yml/badge.svg)](https://github.com/Asembris/Forebear/actions/workflows/codeql.yml)
<br/>
[![Relate 1.0.2 · single file](https://img.shields.io/badge/Relate_1.0.2-single--file_.rl-7fa2ff?style=flat-square&labelColor=0b1322)](#why-relate)
[![Python 3.12](https://img.shields.io/badge/Python-3.12-7fa2ff?style=flat-square&logo=python&logoColor=f1ebdd&labelColor=0b1322)](requirements.txt)
Expand Down Expand Up @@ -82,6 +86,8 @@ Every value in this table is asserted against the shipped store by [`tests/test_

## Judge walkthrough

Prefer to watch first? The [demo video](https://youtu.be/wi9gg9Cik7Y) shows Forebear running, and the [Devpost submission](https://devpost.com/software/forebear) has the project write-up.

No API key, external database or other service is needed: the graph (`data/forebear.rl`) and the web build (`web/dist`) are committed, so nothing is fetched from FDA at run time. Pick one way to run it.

| Path | You need | Tested on |
Expand Down Expand Up @@ -247,7 +253,7 @@ flowchart LR

Limits worth knowing: out-of-family predicates are metadata only, so many lineages stop after one or two generations; recall attribution depends on FDA's `k_numbers` lists; the completeness guarantee covers two generations. Full methods and numbers: [evidence quality](docs/EVIDENCE_QUALITY.md) and [agent evaluation](docs/AGENT_EVALUATION.md).

Continuous integration runs ruff and `pytest` (Ubuntu and Windows), a stale-`web/dist` check and a Playwright suite, `pip-audit`, `npm audit`, gitleaks and actionlint. CodeQL and dependency review are configured but are **skipped while the repository is private**; a skipped run is not a security pass.
Continuous integration runs ruff and `pytest` (Ubuntu and Windows), a stale-`web/dist` check and a Playwright suite, `pip-audit`, `npm audit`, gitleaks and actionlint. CodeQL runs on pushes to `main`, on pull requests and weekly, and passes. Dependency review runs on pull requests only while the repository's dependency graph is enabled; when the dependency graph API is unavailable the Security workflow reports the review as **skipped** with a warning, and a skipped run is not a security pass.

## Go deeper

Expand All @@ -260,7 +266,7 @@ Continuous integration runs ruff and `pytest` (Ubuntu and Windows), a stale-`web
| [UX: "The Invisible Thread"](docs/UX_EXPERIENCE.md) | The opening film, the workspace and the design system |
| [Example investigations](docs/investigations/) | Four committed reports with tool traces, including [K251770](docs/investigations/K251770_I-8203364b195e.md) and [K252078](docs/investigations/K252078_I-ce598786bd48.md) |
| [Third-party notices](THIRD_PARTY_NOTICES.md) | Data rights, manufacturer-authored text, trademarks, bundled fonts and libraries |
| [Submission checklist](docs/SUBMISSION_CHECKLIST.md) | What to confirm before the Devpost entry goes in |
| [Submission checklist](docs/SUBMISSION_CHECKLIST.md) | What was confirmed for the submitted Devpost entry, and what to keep true after it |

## Data, licensing and attribution

Expand Down
7 changes: 4 additions & 3 deletions docs/SUBMISSION_CHECKLIST.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Devpost submission checklist

For the maintainer, before the entry goes in. Check each item against the hackathon's own rules page: its deadline (with time zone), eligibility, video length, required technologies and judging criteria take precedence over this list.
Forebear is public and has been submitted to Devpost: [submission](https://devpost.com/software/forebear), [demo video](https://youtu.be/wi9gg9Cik7Y). This list records what the entry relies on, for the maintainer to keep true after any later change. The hackathon's own rules page (deadline with time zone, eligibility, video length, required technologies and judging criteria) takes precedence over this list.

## Repository

- [ ] **Judges can open the repo.** It is currently private (CodeQL and dependency review are skipped for that reason). Make it public, or grant access the way the rules require.
- [ ] **If it goes public**, re-run the Security workflow and check that CodeQL and dependency review pass. The README must not call a skipped run a pass.
- [x] **Judges can open the repo.** The repository is public.
- [x] **CodeQL passes** on the public repository.
- [ ] **Dependency review** runs on pull requests only while the repository's dependency graph is enabled (repository settings, Advanced Security). Without it the Security workflow reports the review as skipped with a warning. The README must not call a skipped run a pass.
- [ ] **`main` is green.** Backend, Frontend, Security and Hygiene badges at the top of the README.
- [ ] **Fresh-clone run.** Follow the [README walkthrough](../README.md#judge-walkthrough) on a clean machine or folder, by Docker and natively. <http://127.0.0.1:8765/api/health> returns `"ok": true` and [`#/check/K251770`](http://127.0.0.1:8765/#/check/K251770) shows depth 1 and depth 2 side by side.
- [ ] **No secrets.** `.env` is gitignored and gitleaks runs in CI. Keep `.env`, API keys and terminal history out of the video and screenshots.
Expand Down
Loading