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

Main -> Val #2114

Merged
merged 52 commits into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
2f14557
Upgrade to AWS SDK v3 (#2080)
benmartin-coforma Mar 7, 2024
90a60dc
Consolidate CommonQuestions - CombinedRates (#2096)
ailZhou Mar 11, 2024
324cbfc
Bump jose from 4.13.0 to 4.15.5 (#2099)
dependabot[bot] Mar 13, 2024
7f914e2
cmdct-3400 tiny text change (#2103)
britt-mo Mar 13, 2024
4912b14
Enable automerge for bot generated dependency fixes (#2108)
berryd Mar 13, 2024
bf7a619
cmdct-3402 text change for FUM-HH 2024 (#2105)
britt-mo Mar 14, 2024
998d3c8
cmdct-3403 text change to OUD-HH (#2106)
britt-mo Mar 14, 2024
11e7e65
cmdct-3404 changes to IU-HH 2024 (#2107)
britt-mo Mar 14, 2024
ff28f71
cmdct-3383 text change CCP-AD 2024 (#2110)
britt-mo Mar 14, 2024
76ba903
text change CCS-AD 2024 (#2111)
britt-mo Mar 14, 2024
c70b583
cmdct-3385 text change CDF-AD (#2112)
britt-mo Mar 14, 2024
25e6e93
cmdct-3401 - COL-HH text changes (#2104)
britt-mo Mar 14, 2024
cc6b53a
cmdct-3386 text changes COL-AD 2024 (#2113)
britt-mo Mar 14, 2024
5b22ca0
Ghost push snyk fix (hopefully)
berryd Mar 15, 2024
fdc7152
Bump follow-redirects from 1.15.4 to 1.15.6 in /services/ui-src (#2121)
dependabot[bot] Mar 15, 2024
8597d6b
Bump follow-redirects from 1.15.4 to 1.15.6 (#2122)
dependabot[bot] Mar 15, 2024
218c6ea
Bump follow-redirects from 1.15.4 to 1.15.6 in /services/app-api (#2120)
dependabot[bot] Mar 15, 2024
c5aea51
Remove unnecessary step which breaks job (#2125)
berryd Mar 18, 2024
34c4055
updates to HBD-AD 2024 (#2123)
britt-mo Mar 18, 2024
0d09a04
FUM-AD Content Change (#2128)
ailZhou Mar 18, 2024
e07f0dd
cmdct-3394 text update to OUD-AD 2024 (#2124)
britt-mo Mar 18, 2024
df8da55
NCIDDS-AD to NCIIDD-AD (#2126)
ailZhou Mar 18, 2024
64691f9
PPC-AD to PPC2-AD (#2127)
ailZhou Mar 18, 2024
6c90a28
MSC-AD Auto Complete (#2117)
ailZhou Mar 19, 2024
011a895
FVA-AD Removal (#2115)
ailZhou Mar 19, 2024
e756459
Cmdct 3387x (#2131)
britt-mo Mar 19, 2024
07415da
Consolidate CommonQuestions - DateRange (#2102)
ailZhou Mar 19, 2024
c92c7aa
Consolidate CommonQuestions - DefinitionsOfPopulation (#2109)
ailZhou Mar 19, 2024
6612bc3
Consolidate CommonQuestions - DataSource (#2100)
ailZhou Mar 20, 2024
cafbdf0
QMR VPN Deploy Workflow refactor for consistency (#2137)
dwhitestratiform Mar 21, 2024
371df12
Run a11y tests in parallel to speed up pipeline (#2139)
dwhitestratiform Mar 22, 2024
0f3dbbe
changing branch name in deploy step (#2141)
dwhitestratiform Mar 22, 2024
f147517
Export Fix - Component & Cypress (#2140)
ailZhou Mar 22, 2024
2a22d71
relocate NotCollectingOMS (#2136)
britt-mo Mar 25, 2024
0a42b37
Consolidate CommonQuestions - MeasureSpecification (#2130)
ailZhou Mar 25, 2024
75467ad
[CMDCT-3440] Tealium correct param (#2143)
BearHanded Mar 25, 2024
af554ba
Removing Dependabot in favor of Snyk (#2144)
dwhitestratiform Mar 25, 2024
7c7af0c
[QMR] Cypress Test Refactor 1/x - Adult Measures (#2101)
ajaitasaini Mar 27, 2024
59d6b54
Bump webpack-dev-middleware from 5.3.0 to 5.3.4 in /services/ui-src (…
dependabot[bot] Mar 27, 2024
09c1783
Consolidate DataSourceCahps Questions (#2147)
keeysnc Mar 27, 2024
5e43043
Consolidate CommonQuestions - DeviationFromMeasureSpecifications (#2145)
ailZhou Mar 27, 2024
6f372d7
[Snyk] Upgrade @aws-sdk/client-cognito-identity-provider from 3.523.0…
mdct-github-service-account Mar 27, 2024
85ec899
Auotmate resource auditing for account (#2148)
berryd Mar 28, 2024
6c83219
Update audit-account.yml (#2152)
berryd Mar 28, 2024
d036ec0
redirect to the index when routing without error warning (#2134)
BearHanded Mar 29, 2024
81dfeed
Cmdct 3352x - StatusOfData refactor (#2150)
britt-mo Mar 29, 2024
1298c5f
Remove the rateReadOnly prop from PerformanceMeasure; it is unused (#…
benmartin-coforma Mar 29, 2024
46a1e1f
Patch workflow to avoid failing when zero results are returned by rep…
berryd Mar 29, 2024
c946c5b
Fix a typo in deploy.yml (#2156)
benmartin-coforma Mar 29, 2024
b5ff990
Update users.json (#2157)
davidkoger Apr 1, 2024
7455733
Change styles and DOMPurify config to make PDFs look better (#2142)
benmartin-coforma Apr 1, 2024
c862fce
Update PULL_REQUEST_TEMPLATE.md
braxex Apr 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 16 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,32 @@ CMDCT-
<!-- Step-by-step instructions on how to test, if necessary -->


### Important updates
### Notes
<!-- Changed dependencies, .env files, configs, etc. -->
<!-- Instructions for local dev, e.g. requires new installs in directories -->


---
### Author checklist
### Pre-review checklist
<!-- Complete the following steps before opening for review -->

- [ ] I have performed a self-review of my code
- [ ] I have added [thorough](https://shorturl.at/aejkF) tests, if necessary
- [ ] I have updated relevant documentation, if necessary

---
### Pre-merge checklist
<!-- Complete the following steps before merging -->

#### Review
- [ ] Design: This work has been reviewed and approved by design, if necessary
- [ ] Product: This work has been reviewed and approved by product owner, if necessary

#### Security
_If either of the following are true, notify the team's ISSO (Information System Security Officer)._

- [ ] These changes are significant enough to require an update to the SIA.
- [ ] These changes are significant enough to require a penetration test.
---

<!-- If deploying to val or prod, click 'Preview' and select template -->
Expand Down
77 changes: 77 additions & 0 deletions .github/audit-account.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#!/bin/bash
set -o pipefail -o nounset -u
git fetch --all > /dev/null

#Parse inputs
case ${1-} in
"ci_active"|"ci_inactive"|"cf_other"|"untagged")
OP=${1-}
;;
*)
echo "Error: unkown operation"
echo "Usage: ${0} [ci_active|ci_inactive|cf_other|untagged] [resource_tagging_response|null]" && exit 1
;;
esac

shift
if [ ! -z "${1-}" ]; then
if [ -f "${1-}" ]; then
RESOURCES=$(<"${1-}")
else
RESOURCES="${@-}"
fi
jq empty <<< "${RESOURCES}"
[ "$?" != 0 ] && echo "Error: supplied JSON is invalid." && echo ${RESOURCES} && exit 1
else
RESOURCES=$(aws resourcegroupstaggingapi get-resources)
fi

#Create array of objects with the branch name and the interpolated branch name (for bot created branches)
get_branches () {
RAW_BRANCHES=$(git for-each-ref --format='%(refname)' refs/remotes/origin | sed 's|^.\+\/||g')
BRANCHES=()
for B in $RAW_BRANCHES; do
[ "${B}" == "HEAD" ] && continue
IBRANCH=$(./setBranchName.sh ${B})
BRANCHES+=($(echo '{"BRANCH":"'${B}'","IBRANCH":"'${IBRANCH}'"}'))
done

jq -s '{BRANCHES:.}' <<< ${BRANCHES[*]}
}

get_composite_ci () {
local BRANCHES=$(get_branches)
local RESOURCES=$(jq -r '{RESOURCES:[.ResourceTagMappingList[] | select(.Tags[]?.Key?=="STAGE")]}' <<< "${1}")
jq -rs 'reduce .[] as $item ({}; . * $item)
| [JOIN(INDEX(.BRANCHES[]; .IBRANCH); .RESOURCES[]; .Tags[].Value; add)]
| [.[]
| {"BRANCH":.BRANCH, "STAGE":.Tags[]
| select(.Key=="STAGE").Value, "ResourceARN":.ResourceARN}]' <<< $(echo ${BRANCHES}${RESOURCES})
}

#Produce report for active stacks created by the ci pipeline (has a corresponding branch)
ci_active () {
jq -r '[.[] | select(.BRANCH != null)] | sort_by(.STAGE)' <<< $(get_composite_ci "${1}")
}

#Produce report for active stacks created by the ci pipeline (does NOT have a corresponding branch)
ci_inactive () {
jq -r '[.[] | select(.BRANCH == null)] | del(.[].BRANCH) | sort_by(.STAGE)' <<< $(get_composite_ci "${1}")
}

#Produce report for resources that have tags but were not created by the ci pipeline
cf_other () {
jq -r '[.ResourceTagMappingList[] | select((.Tags? | length) > 0) | del(select(.Tags[].Key=="STAGE")) // empty |
{
InferredId: .Tags[] | select(.Key=="aws:cloudformation:stack-name" or .Key=="cms-cloud-service" or .Key=="Name").Value,
ResourceARN: .ResourceARN
}] | sort' <<< "${1}"
}

#Produce report for resources that are untagged (some are still created by the ci pipeline)
untagged () {
jq -r '[{ResourceARN:.ResourceTagMappingList[] | select((.Tags? | length) < 1).ResourceARN}] | sort' <<< "${1}"
}

#Execute operation
$OP "${RESOURCES}"
3 changes: 0 additions & 3 deletions .github/setBranchName.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ GITHUB_REFNAME="${1}"
[ -z "${GITHUB_REFNAME}" ] && echo "Error setting branch name. No input given." && exit 1

case ${GITHUB_REFNAME} in
$([[ "$GITHUB_REFNAME" =~ ^dependabot/.* ]] && echo ${GITHUB_REFNAME}))
echo ${GITHUB_REFNAME} | md5sum | head -c 10 | sed 's/^/x/'
;;
$([[ "$GITHUB_REFNAME" =~ ^snyk-* ]] && echo ${GITHUB_REFNAME}))
echo ${GITHUB_REFNAME##*-} | head -c 10 | sed 's/^/s/'
;;
Expand Down
64 changes: 64 additions & 0 deletions .github/workflows/audit-account.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Audit Account

on:
schedule:
- cron: "0 16 * * 1" # Every Monday at 1600 UTC
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.ref }}
cancel-in-progress: false

permissions:
id-token: write

jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set variable values
run: ./.github/build_vars.sh set_values
env:
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
AWS_OIDC_ROLE_TO_ASSUME: ${{ secrets[env.BRANCH_SPECIFIC_VARNAME_AWS_OIDC_ROLE_TO_ASSUME] || secrets.AWS_OIDC_ROLE_TO_ASSUME }}
- name: Configure AWS credentials for GitHub Actions
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.AWS_OIDC_ROLE_TO_ASSUME }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: Collect resources from account
run: pushd .github && aws resourcegroupstaggingapi get-resources > resources.json
- name: List active resources created by CI pipeline
run: pushd .github && ./audit-account.sh ci_active resources.json
- name: List orphaned resources created by CI pipeline
run: pushd .github && ./audit-account.sh ci_inactive resources.json
- name: List resources created by Cloudformation but not from CI pipeline
run: pushd .github && ./audit-account.sh cf_other resources.json
- name: List untagged resources
run: pushd .github && ./audit-account.sh untagged resources.json
- name: Create reports dir
run: pushd .github && mkdir -p reports
- name: Assemble CSV files
run: |
#!/bin/bash
pushd .github
echo "Reports with no entries will be omitted"
CI_ACTIVE="$(./audit-account.sh ci_active resources.json)"
[[ $(jq -r 'length' <<< "${CI_ACTIVE}") -gt 0 ]] && jq -r '(.[0]
| keys_unsorted) as $keys | $keys, map([.[ $keys[] ]])[] | @csv' <<< "${CI_ACTIVE}" > reports/ci_active.csv
CI_INACTIVE="$(./audit-account.sh ci_inactive resources.json)"
[[ $(jq -r 'length' <<< "${CI_INACTIVE}") -gt 0 ]] && jq -r '(.[0]
| keys_unsorted) as $keys | $keys, map([.[ $keys[] ]])[] | @csv' <<< "${CI_INACTIVE}" > reports/ci_inactive.csv
CF_OTHER="$(./audit-account.sh cf_other resources.json)"
[[ $(jq -r 'length' <<< "${CF_OTHER}") -gt 0 ]] && jq -r '(.[0]
| keys_unsorted) as $keys | $keys, map([.[ $keys[] ]])[] | @csv' <<< "${CF_OTHER}" > reports/cf_other.csv
UNTAGGED="$(./audit-account.sh untagged resources.json)"
[[ $(jq -r 'length' <<< "${UNTAGGED}") -gt 0 ]] && jq -r '(.[0]
| keys_unsorted) as $keys | $keys, map([.[ $keys[] ]])[] | @csv' <<< "${UNTAGGED}" > reports/untagged.csv
- name: Upload reports
uses: actions/upload-artifact@v3
with:
name: resource-reports
path: .github/reports/
retention-days: 14
29 changes: 0 additions & 29 deletions .github/workflows/dependabot-auto-approve.yml

This file was deleted.

Loading
Loading