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
4 changes: 2 additions & 2 deletions .about.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project: "api.data.gov"
full_name: api.data.gov
name: api-data-gov
github:
- 18F/api.data.gov
- GSA/api.data.gov
- NREL/api-umbrella
description: "A hosted, shared-service that provides an API key, analytics, and proxy solution for government web services. We are currently accepting clients for this free service: contact us to learn more."
owner_type: project
Expand Down Expand Up @@ -52,7 +52,7 @@ team:
licenses:
api.data.gov:
name: Public Domain (CC0)
url: https://github.com/18F/api.data.gov/blob/main/LICENSE.md
url: https://github.com/GSA/api.data.gov/blob/main/LICENSE.md
api-umbrella:
name: MIT
url: https://github.com/NREL/api-umbrella/blob/main/LICENSE.txt
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@

env:
COMPOSE_FILE: docker-compose.ci.yml
TEST_IMAGE_REPO: ghcr.io/18f/api.data.gov
TEST_IMAGE_REPO: ghcr.io/gsa/api.data.gov

jobs:
test:
runs-on: ubuntu-latest
outputs:
image-tag: ${{ steps.image-metadata.outputs.version }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
submodules: recursive

- name: Container metadata
id: image-metadata
uses: docker/metadata-action@v5
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
with:
images: ${{ env.TEST_IMAGE_REPO }}
flavor: |
prefix=test-image-

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
uses: docker/login-action@abd2ef45e78c5afb21d64d4ca52ee8550d9572c7 # v4.5.1
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down Expand Up @@ -66,12 +66,12 @@
- deploy_env: staging
contact_api_key_secret_name: STAGING_CONTACT_API_KEY
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
submodules: recursive

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
uses: docker/login-action@abd2ef45e78c5afb21d64d4ca52ee8550d9572c7 # v4.5.1
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand All @@ -90,85 +90,85 @@
hugo \
--minify \
--baseURL "${{ secrets[matrix.web_site_root_secret_name] }}"
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: build-${{ matrix.deploy_env }}
path: ./public

deploy:
if: success() && github.repository_owner == '18F' && github.ref == 'refs/heads/main'
if: success() && github.repository_owner == 'GSA' && github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
container:
image: rclone/rclone:1.62.2
strategy:
matrix:
deploy_env: [production, staging]
include:
- deploy_env: production
bucket_name_secret_name: BUCKET_NAME
- deploy_env: staging
bucket_name_secret_name: STAGING_BUCKET_NAME
- deploy_env: production
aws_access_key_id_secret_name: AWS_ACCESS_KEY_ID
- deploy_env: staging
aws_access_key_id_secret_name: STAGING_AWS_ACCESS_KEY_ID
- deploy_env: production
aws_secret_access_key_secret_name: AWS_SECRET_ACCESS_KEY
- deploy_env: staging
aws_secret_access_key_secret_name: STAGING_AWS_SECRET_ACCESS_KEY
- deploy_env: production
aws_default_region_secret_name: AWS_DEFAULT_REGION
- deploy_env: staging
aws_default_region_secret_name: STAGING_AWS_DEFAULT_REGION
steps:
# Deploy to S3 bucket.
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: build-${{ matrix.deploy_env }}
path: ./public
- name: Deploy
env:
RCLONE_S3_ACCESS_KEY_ID: ${{ secrets[matrix.aws_access_key_id_secret_name] }}
RCLONE_S3_SECRET_ACCESS_KEY: ${{ secrets[matrix.aws_secret_access_key_secret_name] }}
RCLONE_S3_REGION: ${{ secrets[matrix.aws_default_region_secret_name] }}
S3_DEST: ":s3:${{ secrets[matrix.bucket_name_secret_name] }}/"
run: |
# Identify cache-busted assets by the fingerprint in the filename.
cache_busted_assets="/{images,javascripts,stylesheets}/**.{\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w}.*"
# Sync all cache-busted assets with long cache-control expirations.
rclone \
copy \
--verbose \
--checksum \
--no-update-modtime \
--s3-no-check-bucket \
--s3-no-head \
--header-upload "Cache-Control: public, max-age=31536000, immutable" \
--include "$cache_busted_assets" \
./public/ \
"$S3_DEST"
# Sync the remaining files, disallowing caching on those.
rclone \
copy \
--verbose \
--checksum \
--no-update-modtime \
--s3-no-check-bucket \
--s3-no-head \
--header-upload "Cache-Control: no-cache, max-age=0, must-revalidate" \
./public/ \
"$S3_DEST"
# Run the sync one more time to delete old files. Keep old asset
# files around, so that if old HTML pages continue to load for a few
# minutes, they can still load older assets.
rclone \
sync \
--verbose \
--checksum \
--no-update-modtime \
--s3-no-check-bucket \
--s3-no-head \
--exclude "$cache_busted_assets" \
./public/ \
"$S3_DEST"

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
4 changes: 4 additions & 0 deletions .pinact.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
version: 3
min_age:
value: 7
always: true
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[![CI](https://github.com/18F/api.data.gov/workflows/CI/badge.svg)](https://github.com/18F/api.data.gov/actions?workflow=CI) [![Code Climate](https://codeclimate.com/github/18F/api.data.gov/badges/gpa.svg)](https://codeclimate.com/github/18F/api.data.gov) [![Known Vulnerabilities](https://snyk.io/test/github/18F/api.data.gov/badge.svg?targetFile=Gemfile.lock)](https://snyk.io/test/github/18F/api.data.gov?targetFile=Gemfile.lock) [![Known Vulnerabilities](https://snyk.io/test/github/18F/api.data.gov/badge.svg?targetFile=requirements.txt)](https://snyk.io/test/github/18F/api.data.gov?targetFile=requirements.txt)
[![CI](https://github.com/GSA/api.data.gov/workflows/CI/badge.svg)](https://github.com/GSA/api.data.gov/actions?workflow=CI) [![Code Climate](https://codeclimate.com/github/GSA/api.data.gov/badges/gpa.svg)](https://codeclimate.com/github/GSA/api.data.gov) [![Known Vulnerabilities](https://snyk.io/test/github/GSA/api.data.gov/badge.svg?targetFile=Gemfile.lock)](https://snyk.io/test/github/GSA/api.data.gov?targetFile=Gemfile.lock) [![Known Vulnerabilities](https://snyk.io/test/github/GSA/api.data.gov/badge.svg?targetFile=requirements.txt)](https://snyk.io/test/github/GSA/api.data.gov?targetFile=requirements.txt)

# api.data.gov

[https://api.data.gov](https://api.data.gov/) is a free API management service for federal agencies. Our aim is to make it easier for agencies to release and manage APIs.

- [Program Notes for api.data.gov](https://github.com/18F/api.data.gov/wiki/Program-Notes)
- [Program Notes for api.data.gov](https://github.com/GSA/api.data.gov/wiki/Program-Notes)
- [GitHub Repository for API Umbrella](https://github.com/NREL/api-umbrella), the underlying technology of `api.data.gov`

## Notes
Expand All @@ -31,7 +31,7 @@ After you're happy with your changes, commit and submit a pull request.

## Deploy

Changes pushed to `main` should automatically be published to production within a few minutes via the [CI GitHub Action](https://github.com/18F/api.data.gov/actions/workflows/main.yml).
Changes pushed to `main` should automatically be published to production within a few minutes via the [CI GitHub Action](https://github.com/GSA/api.data.gov/actions/workflows/main.yml).

## Public domain

Expand Down
2 changes: 1 addition & 1 deletion config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ disableKinds:
- taxonomy
- term
params:
githubRepoUrl: https://github.com/18F/api.data.gov
githubRepoUrl: https://github.com/GSA/api.data.gov
apiUmbrellaContactApiKey: DEMO_KEY
apiUmbrellaSignupApiKey: DEMO_KEY
csp:
Expand Down
4 changes: 2 additions & 2 deletions content/docs/agency-manual/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ You can embed the API key signup form for api.data.gov on your own developer hub
Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline' https://api.data.gov https://www.google.com/recaptcha/ https://www.gstatic.com/recaptcha/; style-src 'self' https://api.data.gov; img-src 'self' data:; connect-src 'self' https://api.data.gov; frame-src https://www.google.com/recaptcha/ https://recaptcha.google.com/recaptcha/;
```

4. Navigate to the webpage where you placed the snippet. You should see a signup form and be able to signup for an API key completely on your own site. Run into any issues? [File an issue](https://github.com/18F/api.data.gov/issues).
4. Navigate to the webpage where you placed the snippet. You should see a signup form and be able to signup for an API key completely on your own site. Run into any issues? [File an issue](https://github.com/GSA/api.data.gov/issues).

## Linking to your own contact/support address

Expand Down Expand Up @@ -439,7 +439,7 @@ Everything you can do within the api.data.gov admin interface is powered by an A

## How to post an alert box on api.data.gov and on the individual documentation pages to notify users of upcoming status changes.

Edit the source of your documentation page (for example, [source/docs/nrel/index.md.erb](https://github.com/18F/api.data.gov/blob/main/source/docs/nrel/index.md.erb)). Add a snippet like this to the top of the page below the front-matter (below the last `---` line):
Edit the source of your documentation page (for example, [source/docs/nrel/index.md.erb](https://github.com/GSA/api.data.gov/blob/main/source/docs/nrel/index.md.erb)). Add a snippet like this to the top of the page below the front-matter (below the last `---` line):

```html
<div class="alert alert-danger">
Expand Down
20 changes: 10 additions & 10 deletions docs/procedures.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ This document is to memorialize internal project procedures. Other agencies or t

##### api.data.gov

The System owner and current project developers need commit rights to api.data.gov project repositories ([here](https://github.com/18F/api.data.gov) and [here](https://github.com/18F/api.data.gov-ops). The system owner (currently Gray Brooks) manages this access, granting access to new project developers when they come onboard and removing access when they leave.
The System owner and current project developers need commit rights to api.data.gov project repositories ([here](https://github.com/GSA/api.data.gov) and [here](https://github.com/GSA/api.data.gov-ops). The system owner (currently Gray Brooks) manages this access, granting access to new project developers when they come onboard and removing access when they leave.

Specifically, current developers are managed as the `api.data.gov` team in the 18F GitHub organization.

Both of the adding and removing processes should be initiated by creating an issue in the project's [issue tracker](https://github.com/18F/api.data.gov/issues). Any one can create the issue, but the system owner should be the one who addresses and closes it.
Both of the adding and removing processes should be initiated by creating an issue in the project's [issue tracker](https://github.com/GSA/api.data.gov/issues). Any one can create the issue, but the system owner should be the one who addresses and closes it.

These accounts are created for developers that need access to contribute code and deploy apps.

Expand All @@ -26,11 +26,11 @@ For the api.data.gov service, we utilize [a public, opensource project](https://

The System owner and current project developers need application admin rights within the [api.data.gov system](https://api.data.gov/admin). The system owner (currently Gray Brooks) manages this access, granting access to new project developers when they come onboard and removing access when they leave.

Both of the adding and removing processes should be initiated by creating an issue in the project's [issue tracker](https://github.com/18F/api.data.gov/issues). Any one can create the issue, but the system owner should be the one who addresses and closes it.
Both of the adding and removing processes should be initiated by creating an issue in the project's [issue tracker](https://github.com/GSA/api.data.gov/issues). Any one can create the issue, but the system owner should be the one who addresses and closes it.

These accounts are created for developers that need access to view system data across all participating APIs and to help set up and manage agency access to the system.

1. Create an issue in the project's [issue tracker](https://github.com/18F/api.data.gov/issues) to track the request.
1. Create an issue in the project's [issue tracker](https://github.com/GSA/api.data.gov/issues) to track the request.
2. The system owner, currently Gray Brooks, should see and respond to it. If there's any urgency, contact him via Slack or Email.
3. The system owner will confirm the GSA identity of the applicant, and signal approval in the ticket.
4. The system owner will then create the api.data.gov admin account for the new member, grant them the appropriate permissions, and close the ticket.
Expand All @@ -41,7 +41,7 @@ Agency contacts need api.data.gov accounts in order to view the api key users an

The adding process should be initiated by creating an issue in the project's [ops issue tracker](https://github.com/18f/api.data.gov-ops/issues). Any one can create the issue, but the system owner should be the one who addresses and closes it.

1. Create an issue in the project's [issue tracker](https://github.com/18F/api.data.gov/issues) to track the request.
1. Create an issue in the project's [issue tracker](https://github.com/GSA/api.data.gov/issues) to track the request.
2. The system owner, currently Gray Brooks, should see and respond to it. If there's any urgency, contact him via Slack or Email.
3. The system owner will confirm the agency identity of the applicant, and signal approval in the ticket.
4. The system owner will then create the api.data.gov admin account for the new members, grant them the appropriate permissions, and close the ticket.
Expand All @@ -52,11 +52,11 @@ The System owner and current project developers need cloud.gov access to api.dat

Specifically, current developers are [granted](https://cloud.gov/docs/apps/managing-teammates/) OrgManager rights to `gsa-tts-api-data-gov`.

Both of the adding and removing processes should be initiated by creating an issue in the project's [issue tracker](https://github.com/18F/api.data.gov/issues). Any one can create the issue, but the system owner should be the one who addresses and closes it.
Both of the adding and removing processes should be initiated by creating an issue in the project's [issue tracker](https://github.com/GSA/api.data.gov/issues). Any one can create the issue, but the system owner should be the one who addresses and closes it.

These accounts are created for developers that need access to contribute code and debug apps.

1. Create an issue in the project's [issue tracker](https://github.com/18F/api.data.gov/issues) to track the request.
1. Create an issue in the project's [issue tracker](https://github.com/GSA/api.data.gov/issues) to track the request.

1. [Create an account]() with cloud.gov and this will include multi factor authentication with [Google authenticator](https://support.google.com/accounts/answer/1066447?hl=en) or [authy](https://www.authy.com/).

Expand All @@ -72,11 +72,11 @@ The System owner and current project developers need cloud.gov access to api.dat

Specifically, current developers are [granted](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_users.html) `Developer` rights to the `apidatagov` AWS account.

Both of the adding and removing processes should be initiated by creating an issue in the project's [issue tracker](https://github.com/18F/api.data.gov/issues). Any one can create the issue, but the system owner should be the one who addresses and closes it.
Both of the adding and removing processes should be initiated by creating an issue in the project's [issue tracker](https://github.com/GSA/api.data.gov/issues). Any one can create the issue, but the system owner should be the one who addresses and closes it.

These accounts are created for developers that need access to contribute code and debug apps.

1. Create an issue in the project's [issue tracker](https://github.com/18F/api.data.gov/issues) to track the request.
1. Create an issue in the project's [issue tracker](https://github.com/GSA/api.data.gov/issues) to track the request.

2. The system owner will confirm the GSA identity of the applicant and comment on the ticket to show approval.

Expand All @@ -98,7 +98,7 @@ The development team checks for security events weekly. Any unusual or suspiciou

Checklist:

1. Create an issue in the project's [issue tracker](https://github.com/18F/api.data.gov/issues) to track this Security Event Review.
1. Create an issue in the project's [issue tracker](https://github.com/GSA/api.data.gov/issues) to track this Security Event Review.
2. Review tool for all repositories and open a ticket for all "red" alerts.
3. Review [production logs](https://logs.fr.cloud.gov) for unapproved and unusual activities.
4. Review actionable security events on production logs for successful and unsuccessful account logon events, account management events, object access, policy change, privilege functions, process tracking, system events, all administrator activity, authentication checks, authorization checks, data deletions, data access, data changes, and permission changes.
Expand Down
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,31 @@
"@uswds/uswds": "^3.13.0",
"a11y-dialog": "^8.1.5",
"bootstrap": "^5.3.8",
"datatables.net-dt": "^2.3.7",
"datatables.net-dt": "^2.3.8",
"echarts": "^6.1.0",
"escape-html": "^1.0.3",
"form-serialize": "^0.7.2",
"ky": "^1.14.3",
"lodash-es": "^4.18.1",
"pinia": "^3.0.4",
"vue": "^3.5.31",
"vue-router": "^5.0.4"
"vue": "^3.5.40",
"vue-router": "^5.2.0"
},
"devDependencies": {
"@eslint/compat": "^2.0.3",
"@eslint/compat": "^2.1.0",
"@eslint/js": "^10.0.1",
"autoprefixer": "^10.4.27",
"eslint": "^10.1.0",
"autoprefixer": "^10.5.4",
"eslint": "^10.7.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-vue": "^10.8.0",
"globals": "^17.4.0",
"postcss": "^8.5.18",
"eslint-plugin-vue": "^10.10.0",
"globals": "^17.7.0",
"postcss": "^8.5.23",
"postcss-cli": "^11.0.1",
"postcss-prefixwrap": "^1.57.2",
"postcss-prefixwrap": "^1.58.0",
"postcss-relative-rem": "^1.0.0",
"prettier": "^3.8.1",
"prettier": "^3.9.6",
"prettier-plugin-go-template": "^0.0.15",
"vue-eslint-parser": "^10.4.0"
"vue-eslint-parser": "^10.4.1"
}
}
Loading