Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
c2aff06
Merge pull request #2241 from opengovsg/release-1.76.1
halfwhole Jul 13, 2023
90479be
Experiment go <> sgid integration (#2247)
PikkaPikkachu Aug 3, 2023
6b3e5df
1.77.0
PikkaPikkachu Aug 3, 2023
f53142d
Merge pull request #2250 from opengovsg/release-1.77
PikkaPikkachu Aug 4, 2023
801c4ae
fix: stored xss via file upload (#2258)
thamsimun Aug 22, 2023
feab32c
1.77.1
thamsimun Sep 7, 2023
931d9e3
Merge pull request #2267 from opengovsg/release-1.77.1
thamsimun Sep 7, 2023
c6321f2
build(deps): bump import-in-the-middle from 1.4.1 to 1.4.2 (#2259)
halfwhole Sep 21, 2023
ae740a3
[Snyk] Security upgrade sharp from 0.30.7 to 0.32.6 (#2277)
gweiying Oct 2, 2023
b3a5bee
1.77.2
PikkaPikkachu Oct 2, 2023
c1acc3c
Merge pull request #2279 from opengovsg/release-1.77.2
PikkaPikkachu Oct 2, 2023
a8ae407
feat: remove verify message button linking to checkwho (#2284)
halfwhole Oct 17, 2023
a8ff80c
1.78.0
thamsimun Dec 13, 2023
7247e31
Merge pull request #2287 from opengovsg/release-1.78
halfwhole Dec 29, 2023
3ef2dd0
build(deps): bump node from 16 to 18 (#2285)
halfwhole Feb 5, 2024
54cac98
chore: fix serverless plugin include dependencies to v5 (#2290)
halfwhole Feb 19, 2024
a71d1a9
build(deps): bump webpack-dev-server from 3 to 4 (#2291)
halfwhole Feb 19, 2024
33cceca
1.78.1
halfwhole Feb 19, 2024
c2fdac2
Merge pull request #2298 from opengovsg/release-1.78.1
gweiying Mar 18, 2024
f71e34b
Chore/fix user query (#2299)
gweiying Mar 18, 2024
efd86f6
1.78.2
gweiying Mar 18, 2024
822d2db
Merge pull request #2301 from opengovsg/release-1.78.2
gweiying Mar 20, 2024
7c8cea6
Chore/disable link stats (#2304)
gweiying Mar 21, 2024
1e1f53b
chore: replace safe browsing with web risk (#2305)
gweiying Mar 21, 2024
2ab4e4d
1.79.0
gweiying Mar 21, 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
41 changes: 41 additions & 0 deletions .ebextensions/25-load-sgid-env.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# loads SGID environment variables to a .env file from SSM

commands:
01-create-env:
command: "/tmp/create-env.sh"

files:
"/tmp/create-env.sh":
mode: "000755"
content : |
#!/bin/bash
ENV_NAME=$(/opt/elasticbeanstalk/bin/get-config environment -k SSM_PREFIX)

ENV_VARS=("SGID_CLIENT_ID" "SGID_CLIENT_SECRET" "SGID_PRIVATE_KEY")

echo "Set AWS region"
aws configure set default.region ap-southeast-1

TARGET_DIR=/etc/gogovsg

echo "Checking if ${TARGET_DIR} exists..."
if [ ! -d ${TARGET_DIR} ]; then
echo "Creating directory ${TARGET_DIR} ..."
mkdir -p ${TARGET_DIR}
if [ $? -ne 0 ]; then
echo 'ERROR: Directory creation failed!'
exit 1
fi
else
echo "Directory ${TARGET_DIR} already exists!"
fi

echo "Creating config for ${ENV_NAME} in ${AWS_REGION}"

for ENV_VAR in "${ENV_VARS[@]}"; do
echo "Running for this ${ENV_NAME}"
echo "Fetching ${ENV_VAR} from SSM"
VALUE=$(aws ssm get-parameter --name "${ENV_NAME}_${ENV_VAR}" --with-decryption --query "Parameter.Value" --output text)
echo "${ENV_VAR}=${VALUE}" >> $TARGET_DIR/.env
echo "Saved ${ENV_VAR}"
done
31 changes: 17 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '16.x'
node-version: '18.x'
- name: Cache Node.js modules
uses: actions/cache@v2
with:
Expand All @@ -55,7 +55,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '16.x'
node-version: '18.x'
- name: Cache Node.js modules
uses: actions/cache@v2
with:
Expand All @@ -79,7 +79,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '16.x'
node-version: '18.x'
- name: Cache Node.js modules
uses: actions/cache@v2
with:
Expand All @@ -100,7 +100,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '16.x'
node-version: '18.x'
- name: Cache Node.js modules
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -142,7 +142,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '16.x'
node-version: '18.x'
- name: Cache Node.js modules
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -229,10 +229,10 @@ jobs:
if: needs.gatekeep.outputs.proceed == 'true'
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16.x
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '16.x'
node-version: '18.x'
- run: |
echo SERVERLESS_SERVICE=gogovsg >> $GITHUB_ENV;
if [[ $GITHUB_REF == $STAGING_BRANCH ]]; then
Expand Down Expand Up @@ -296,7 +296,8 @@ jobs:
- name: serverless deploy
uses: opengovsg/[email protected]
with:
args: -c "serverless plugin install --name serverless-plugin-include-dependencies && serverless deploy --stage=$BRANCH_ENV --conceal --verbose"
# serverless-plugin-include-dependencies v6 onwards requires node 18
args: -c "serverless plugin install --name [email protected] && serverless deploy --stage=$BRANCH_ENV --conceal --verbose"
entrypoint: /bin/bash
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down Expand Up @@ -353,10 +354,10 @@ jobs:
if: needs.gatekeep.outputs.proceed == 'true'
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16.x
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '16.x'
node-version: '18.x'
- run: |
echo SERVERLESS_SERVICE=edu >> $GITHUB_ENV;
if [[ $GITHUB_REF == $STAGING_BRANCH ]]; then
Expand Down Expand Up @@ -422,7 +423,8 @@ jobs:
- name: serverless deploy
uses: opengovsg/[email protected]
with:
args: -c "serverless plugin install --name serverless-plugin-include-dependencies && serverless deploy --stage=$BRANCH_ENV --conceal --verbose"
# serverless-plugin-include-dependencies v6 onwards requires node 18
args: -c "serverless plugin install --name [email protected] && serverless deploy --stage=$BRANCH_ENV --conceal --verbose"
entrypoint: /bin/bash
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down Expand Up @@ -479,10 +481,10 @@ jobs:
if: needs.gatekeep.outputs.proceed == 'true'
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16.x
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '16.x'
node-version: '18.x'
- run: |
echo SERVERLESS_SERVICE=health >> $GITHUB_ENV;
if [[ $GITHUB_REF == $STAGING_BRANCH ]]; then
Expand Down Expand Up @@ -548,7 +550,8 @@ jobs:
- name: serverless deploy
uses: opengovsg/[email protected]
with:
args: -c "serverless plugin install --name serverless-plugin-include-dependencies && serverless deploy --stage=$BRANCH_ENV --conceal --verbose"
# serverless-plugin-include-dependencies v6 onwards requires node 18
args: -c "serverless plugin install --name [email protected] && serverless deploy --stage=$BRANCH_ENV --conceal --verbose"
entrypoint: /bin/bash
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down
53 changes: 53 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,61 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v1.79.0](https://github.com/opengovsg/GoGovSG/compare/v1.78.2...v1.79.0)

- chore: replace safe browsing with web risk [`#2305`](https://github.com/opengovsg/GoGovSG/pull/2305)
- Chore/disable link stats [`#2304`](https://github.com/opengovsg/GoGovSG/pull/2304)
- [develop] 1.78.2 [`#2301`](https://github.com/opengovsg/GoGovSG/pull/2301)

#### [v1.78.2](https://github.com/opengovsg/GoGovSG/compare/v1.78.1...v1.78.2)

> 18 March 2024

- Chore/fix user query [`#2299`](https://github.com/opengovsg/GoGovSG/pull/2299)
- [develop] 1.78.1 [`#2298`](https://github.com/opengovsg/GoGovSG/pull/2298)

#### [v1.78.1](https://github.com/opengovsg/GoGovSG/compare/v1.78.0...v1.78.1)

> 19 February 2024

- build(deps): bump webpack-dev-server from 3 to 4 [`#2291`](https://github.com/opengovsg/GoGovSG/pull/2291)
- chore: fix serverless plugin include dependencies to v5 [`#2290`](https://github.com/opengovsg/GoGovSG/pull/2290)
- build(deps): bump node from 16 to 18 [`#2285`](https://github.com/opengovsg/GoGovSG/pull/2285)
- [Develop] 1.78.0 [`#2287`](https://github.com/opengovsg/GoGovSG/pull/2287)

#### [v1.78.0](https://github.com/opengovsg/GoGovSG/compare/v1.77.2...v1.78.0)

> 13 December 2023

- feat: remove verify message button linking to checkwho [`#2284`](https://github.com/opengovsg/GoGovSG/pull/2284)
- [develop] 1.77.2 [`#2279`](https://github.com/opengovsg/GoGovSG/pull/2279)

#### [v1.77.2](https://github.com/opengovsg/GoGovSG/compare/v1.77.1...v1.77.2)

> 2 October 2023

- [Snyk] Security upgrade sharp from 0.30.7 to 0.32.6 [`#2277`](https://github.com/opengovsg/GoGovSG/pull/2277)
- build(deps): bump import-in-the-middle from 1.4.1 to 1.4.2 [`#2259`](https://github.com/opengovsg/GoGovSG/pull/2259)
- [Develop] 1.77.1 [`#2267`](https://github.com/opengovsg/GoGovSG/pull/2267)

#### [v1.77.1](https://github.com/opengovsg/GoGovSG/compare/v1.77.0...v1.77.1)

> 7 September 2023

- fix: stored xss via file upload [`#2258`](https://github.com/opengovsg/GoGovSG/pull/2258)
- Develop 1.77.0 [`#2250`](https://github.com/opengovsg/GoGovSG/pull/2250)

#### [v1.77.0](https://github.com/opengovsg/GoGovSG/compare/v1.76.1...v1.77.0)

> 3 August 2023

- Experiment go &lt;&gt; sgid integration [`#2247`](https://github.com/opengovsg/GoGovSG/pull/2247)
- [develop] 1.76.1 [`#2241`](https://github.com/opengovsg/GoGovSG/pull/2241)

#### [v1.76.1](https://github.com/opengovsg/GoGovSG/compare/v1.76.0...v1.76.1)

> 13 July 2023

- build(deps): bump semver from 7.3.8 to 7.5.4 [`#2239`](https://github.com/opengovsg/GoGovSG/pull/2239)
- build(deps): bump react-vis from 1.11.7 to 1.11.8 [`#2238`](https://github.com/opengovsg/GoGovSG/pull/2238)
- build(deps): bump @sentry/cli from 1.67.2 to 1.75.2 [`#2231`](https://github.com/opengovsg/GoGovSG/pull/2231)
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-alpine3.18
FROM node:18-alpine3.18

LABEL maintainer="Open Government Products" email="[email protected]"

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=amd64 node:16-alpine3.18
FROM --platform=amd64 node:18-alpine3.18

LABEL maintainer="Open Government Products" email="[email protected]"

Expand Down
6 changes: 6 additions & 0 deletions Dockerrun.aws.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,11 @@
{
"ContainerPort": "8080"
}
],
"Volumes": [
{
"HostDirectory": "/etc/gogovsg/.env",
"ContainerDirectory": "/usr/src/gogovsg/.env"
}
]
}
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ With GoGovSg, citizens are safe in the knowledge that the links are **official**

## Getting Started

Make sure you have node version `16`, docker-compose version >= `1.23.1` and Docker version >= `18.09.0` installed.
Make sure you have node version `18`, docker-compose version >= `1.23.1` and Docker version >= `18.09.0` installed.

> *For Mac computers with Apple silicon, you will need Rosetta to be installed in order for `docker-compose@v1` to work. You can do so using the following command: `softwareupdate --install-rosetta`.

Expand Down Expand Up @@ -146,6 +146,7 @@ After these have been set up, set the environment variables according to the tab
|API_LINK_RANDOM_STR_LENGTH|No|String length of randomly generated shortUrl in API created links. Defaults to 8|
|FF_EXTERNAL_API|No|Boolean, feature flag for enabling the external and admin API. Defaults to false|
|ADMIN_API_EMAILS|No|Emails with admin API access, separated by commas without spaces. Defaults to none.|
|FF_USE_REPLICA_FOR_REDIRECTS|No|Boolean, feature flag for using the replica database to look up redirects to long URLs. Defaults to false|

#### Serverless functions for link migration

Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ services:
- REDIS_SAFE_BROWSING_URI=redis://redis:6379/4
- SESSION_SECRET=thiscouldbeanything
- GA_TRACKING_ID=UA-139330318-1
- SGID_API_HOSTNAME=https://api.id.gov.sg

- OG_URL=https://go.gov.sg
- VALID_EMAIL_GLOB_EXPRESSION=*.gov.sg
- COOKIE_MAX_AGE=86400000
Expand Down
Loading