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

merge master into prod in preparation of release v2.0.0 #1064

Draft
wants to merge 60 commits into
base: prod
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
6d64263
Merge pull request #1002 from clearlydefined/prod
mpcen Oct 3, 2022
2b2321a
Include component type in search pattern for browse
qtomlinson Oct 4, 2022
724a3ce
Merge pull request #1003 from qtomlinson/qt/fix_search
mpcen Oct 5, 2022
7ffab63
Fix the capitalization of "PyPI"
brettcannon Nov 16, 2022
b517b48
Merge pull request #1005 from brettcannon/fix-PyPI-capitalization
jeffwilcox Nov 6, 2023
2424b87
updating pipelines to ubuntu-20.04
capfei Jan 12, 2024
fc299e9
Merge pull request #1031 from capfei/patch-3
qtomlinson Feb 10, 2024
0d30966
Add GitHub Actions workflow file to run CI
lumaxis Feb 15, 2024
dfe8f57
Use Node 10 in CI
lumaxis Feb 15, 2024
b503e9d
Merge pull request #1035 from lumaxis/add-github-actions-workflow
lumaxis Apr 4, 2024
680b911
Use latest working version of Node
lumaxis Apr 4, 2024
c857d33
Update package.json with latest supported version of npm
lumaxis Apr 4, 2024
999ef18
Add Docker build to Actions workflow
lumaxis Apr 4, 2024
24ae732
Remove Azure Pipelines config
lumaxis Apr 4, 2024
990e91d
Update package-lock.json version to 3
lumaxis Apr 16, 2024
4a881b7
Merge pull request #1036 from clearlydefined/update-node
lumaxis Apr 18, 2024
0595340
Add workflow to deploy to dev environment
lumaxis May 6, 2024
829a8bf
Merge pull request #1046 from lumaxis/build-deploy-workflow
lumaxis May 8, 2024
e3c63d0
Merge branch 'master' into remove-azure-pipelines
lumaxis May 13, 2024
a8850c1
Create Actions workflow to deploy to production
lumaxis May 13, 2024
f414466
Apply suggestions from code review
lumaxis May 29, 2024
8901096
Merge pull request #1047 from clearlydefined/build-deploy-workflow-prod
elrayle May 30, 2024
04b089c
Merge branch 'master' into remove-azure-pipelines
lumaxis May 30, 2024
b3f6e34
Merge pull request #1038 from clearlydefined/remove-azure-pipelines
lumaxis May 30, 2024
ade8e87
Move docker build to separate job
lumaxis May 30, 2024
3510524
Update test.yml
lumaxis May 30, 2024
ad12cd5
docs: change footer
Jun 3, 2024
9a521bb
Merge pull request #1052 from nickvidal/footer
elrayle Jun 5, 2024
9f984a6
Bump express from 4.17.1 to 4.19.2
dependabot[bot] Jun 10, 2024
4406197
Merge pull request #1043 from clearlydefined/dependabot/npm_and_yarn/…
elrayle Jun 10, 2024
450068f
Merge pull request #1051 from clearlydefined/actions-docker-build-job
lumaxis Jun 10, 2024
672e4ee
Bump es5-ext from 0.10.53 to 0.10.64
dependabot[bot] Jun 11, 2024
d447eee
Merge pull request #1041 from clearlydefined/dependabot/npm_and_yarn/…
elrayle Jun 11, 2024
5cee859
Bump follow-redirects from 1.14.9 to 1.15.6
dependabot[bot] Jun 11, 2024
a2b284c
Merge pull request #1040 from clearlydefined/dependabot/npm_and_yarn/…
elrayle Jun 12, 2024
4aa7b73
docs: add SECURITY.md
Jun 19, 2024
109f0a3
docs: fix broken links in about page
Jul 2, 2024
f7b16c9
docs: fix get involved link
Jul 2, 2024
35cf336
docs: fix more links that point to docs
Jul 3, 2024
f4a8f5b
Merge pull request #1055 from nickvidal/links
elrayle Jul 3, 2024
9da319a
Merge branch 'master' into secure
nickvidal Jul 11, 2024
a84dbf3
Merge pull request #1053 from nickvidal/secure
nickvidal Jul 11, 2024
13ff888
use v2.0.0 deploy & pass docker build args
elrayle Jul 11, 2024
ce47ee1
add in tracking id
elrayle Jul 11, 2024
d4fdf97
Merge pull request #1058 from clearlydefined/elr/test-new-deploy
elrayle Jul 11, 2024
f5fcbbe
have to pull off tracking id in job with steps and pass to next job a…
elrayle Jul 11, 2024
fe641f7
Merge pull request #1059 from clearlydefined/elr/fix-trackingid
elrayle Jul 12, 2024
5cc6024
Remove quotes from REACT_APP_SERVER
elrayle Jul 24, 2024
33e714d
Remove quotes from remaining docker build-args
elrayle Jul 24, 2024
83be6d0
Merge pull request #1060 from clearlydefined/elr/build-deploy-dev
elrayle Jul 24, 2024
a3a3ae1
Update node version
ljones140 Oct 22, 2024
bb865bb
Use version 18
ljones140 Oct 22, 2024
4516264
14 lowest version with features we need
ljones140 Oct 22, 2024
1d8c29a
Use latest version of 14
ljones140 Oct 22, 2024
654d7fc
Merge pull request #1065 from clearlydefined/update-node
ljones140 Oct 22, 2024
8d642df
nginx exposes health enpoint
ljones140 Oct 30, 2024
65a35a0
Dockerfile needs args for health
ljones140 Oct 30, 2024
e97694a
Health endpoint exposed by nginx
ljones140 Oct 30, 2024
813365f
Use new workflow
ljones140 Oct 30, 2024
bb31409
Merge pull request #1068 from clearlydefined/ljones140/nginx-health
ljones140 Oct 31, 2024
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
49 changes: 49 additions & 0 deletions .github/workflows/build-and-deploy-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# This workflow will build a docker image, push it to ghcr.io, and deploy it to an Azure WebApp.
name: Build and Deploy -- DEV

on:
workflow_dispatch:
push:
branches: [master]

jobs:
upload-package-lock-json:
name: Upload package-lock.json from this repo
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1

- name: Upload package-lock.json
uses: actions/upload-artifact@v4
with:
name: package-lock.json
path: package-lock.json

make-react-secret-available:
name: Make REACT_APP_GA_TRACKINGID_DEV secret available in env
runs-on: ubuntu-latest
outputs:
trackingid: "${{ env.REACT_APP_GA_TRACKINGID }}"
steps:
- name: Make secret available
run: |
echo "REACT_APP_GA_TRACKINGID=$REACT_APP_GA_TRACKINGID_DEV" >> $GITHUB_ENV

build-and-deploy:
name: Build and Deploy
needs: [upload-package-lock-json, make-react-secret-available]
uses: clearlydefined/operations/.github/workflows/app-build-and-deploy.yml@v3.1.2
secrets:
AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }}
AZURE_WEBAPP_PUBLISH_PROFILE: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE_DEV }}
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
PRODUCTION_DEPLOYERS: ${{ secrets.PRODUCTION_DEPLOYERS }}
with:
deploy-env: dev
application-type: ui
azure-app-base-name: clearlydefined
azure-app-name-postfix: -dev
docker-build-args: |
REACT_APP_SERVER=https://dev-api.clearlydefined.io
REACT_APP_GA_TRACKINGID=${{ needs.make-react-secret-available.outputs.trackingid }}
23 changes: 23 additions & 0 deletions .github/workflows/build-and-deploy-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This workflow will build a docker image, push it to ghcr.io, and deploy it to an Azure WebApp.
name: Build and Deploy -- PROD

on:
workflow_dispatch:
release:
types: [published]

jobs:
build-and-deploy-prod:
uses: clearlydefined/operations/.github/workflows/app-build-and-deploy.yml@v1.1.0
secrets:
AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }}
AZURE_WEBAPP_PUBLISH_PROFILE: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE_PROD }}
AZURE_SECONDARY_WEBAPP_PUBLISH_PROFILE: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE_PROD_EU }}
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
PRODUCTION_DEPLOYERS: ${{ secrets.PRODUCTION_DEPLOYERS }}
with:
deploy-env: prod
application-type: ui
azure-app-base-name: clearlydefined
azure-app-name-postfix: -prod
secondary-azure-app-name-postfix: -prod-europe
42 changes: 42 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Run Docker build and tests

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

permissions:
contents: read

jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 14
cache: 'npm'

- name: Update npm
run: npm install -g npm@9

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm test

docker-build:
name: Build Docker image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Docker build
run: docker build .
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.15.3
14.21.3
3 changes: 2 additions & 1 deletion DevDockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Copyright (c) Microsoft Corporation and others. Licensed under the MIT license.
# SPDX-License-Identifier: MIT
FROM node:10-alpine as builder
FROM node:14-alpine as builder
COPY . /opt/website
WORKDIR /opt/website
ARG REACT_APP_SERVER=http://localhost:4000
ARG REACT_APP_GA_TRACKINGID
RUN apk add --no-cache git
RUN npm install -g npm@9
RUN npm install

EXPOSE 3000
Expand Down
21 changes: 18 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,30 @@
# Copyright (c) Microsoft Corporation and others. Licensed under the MIT license.
# SPDX-License-Identifier: MIT
FROM node:10-alpine as builder
FROM node:14-alpine as builder
COPY . /opt/website
WORKDIR /opt/website

# Set environment variables from build arguments
ARG APP_VERSION="UNKNOWN"
ENV APP_VERSION=$APP_VERSION
ARG BUILD_SHA="UNKNOWN"
ENV BUILD_SHA=$BUILD_SHA

ARG REACT_APP_SERVER=http://localhost:4000
ARG REACT_APP_GA_TRACKINGID
RUN apk add --no-cache git
RUN npm install -g npm@9
RUN npm install
RUN npm run build

FROM nginx:alpine
ADD nginx.conf /etc/nginx/conf.d/default.conf
FROM nginx:1.19.6-alpine

ARG APP_VERSION="UNKNOWN"
ENV APP_VERSION=$APP_VERSION
ARG BUILD_SHA="UNKNOWN"
ENV BUILD_SHA=$BUILD_SHA

RUN mkdir /etc/nginx/templates
COPY default.conf.template /etc/nginx/templates
COPY --from=builder /opt/website/build /usr/share/nginx/html
EXPOSE 80
71 changes: 71 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Vulnerability Disclosure and Embargo Policy

The ClearlyDefined project welcomes the responsible disclosure of vulnerabilities, including those discovered in:

- [ClearlyDefined website](https://github.com/clearlydefined/website/security/advisories/new)
- [ClearlyDefined service](https://github.com/clearlydefined/service/security/advisories/new)
- [ClearlyDefined crawler](https://github.com/clearlydefined/crawler/security/advisories/new)
- [ClearlyDefined documentation](https://github.com/clearlydefined/clearlydefined/security/advisories/new)

## Initial Contact

All security bugs in ClearlyDefined should be reported to the security team.
To do so, please reach out in the form of a
[Github Security Advisory](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities).

You will be invited to join this private area to discuss specifics. Doing so
allows us to start with a high level of confidentiality and relax it if the
issue is less critical, moving to work on the fix in the open.

Your initial contact will be acknowledged within 48 hours, and you’ll receive
a more detailed response within 96 hours indicating the next steps in handling
your report.

After the initial reply to your report, the security team will endeavor to
keep you informed of the progress being made towards a fix and full
announcement. As recommended by
[RFPolicy](https://dl.packetstormsecurity.net/papers/general/rfpolicy-2.0.txt),
these updates will be sent at least every five working days.

## Disclosure Policy

The ClearlyDefined project has a 5 step disclosure process.

1. Contact is established, a private channel created, and the security report
is received and is assigned a primary handler. This person will coordinate
the fix and release process.
2. The problem is confirmed and a list of all affected versions is determined.
If an embargo is needed (see below), details of the embargo are decided.
3. Code is audited to find any potential similar problems.
4. Fixes are prepared for all releases which are still under maintenance. In
case of embargo, these fixes are not committed to the public repository but
rather held in a private fork pending the announcement.
5. The changes are pushed to the public repository and new builds are deployed.

This process can take some time, especially when coordination is required
with maintainers of other projects. Every effort will be made to handle the bug
in as timely a manner as possible, however it is important that we follow the
release process above to ensure that the disclosure is handled in a consistent
manner.

## Embargoes

While the ClearlyDefined project aims to follow the highest standards of
transparency and openness, handling some security issues may pose such an
immediate threat to various stakeholders and require coordination between
various actors that it cannot be made immediately public.

In this case, security issues will fall under an embargo.

An embargo can be called for in various cases:

- when disclosing the issue without simultaneously providing a mitigation
would seriously endanger users,
- when producing a fix requires coordinating between multiple actors (such as
upstream or downstream/dependency projects), or simply
- when proper analysis of the issue and its ramifications demands time.

If we determine that an issue you report requires an embargo, we will discuss
this with you and try to find a reasonable expiry date (aka “embargo
completion date”), as well as who should be included in the list of
need-to-know people.
24 changes: 0 additions & 24 deletions azure-pipelines.yml

This file was deleted.

5 changes: 5 additions & 0 deletions nginx.conf → default.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ server {
etag off;
}

location /health {
add_header 'Content-Type' 'application/json';
return 200 '{"status":"OK", "version": "${APP_VERSION}", "sha": "${BUILD_SHA}"}';
}

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
Expand Down
Loading
Loading