### JavaScript String.fromCodePoint Example
Source: https://github.com/bitovi/github-actions-aws-secrets-manager/blob/main/dist/licenses.txt
Demonstrates the usage of String.fromCodePoint in JavaScript, as per the MIT license terms.
```javascript
console.log(String.fromCodePoint(65));
// Expected output: 'A'
```
--------------------------------
### Usage Example: Fetching Secrets from AWS Secrets Manager
Source: https://github.com/bitovi/github-actions-aws-secrets-manager/blob/main/README.md
Demonstrates how to use the AWS Secrets Manager GitHub Action to fetch secrets and set them as environment variables. It includes configuring AWS credentials and checking if the environment variable is set.
```yaml
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Read secrets from AWS Secrets Manager into environment variables
uses: bitovi/github-actions-aws-secrets-manager@v2.1.0
with:
secrets: |
my_secret_1
app1/dev/*
parse-json: true
- name: Check if env variable is set after fetching secrets
run: if [ -z ${MY_SECRET_1+x} ]; then echo "MY_SECRET_1 is unset"; else echo "MY_SECRET_1 is set to '$MY_SECRET_1'"; fi
```
--------------------------------
### Secret Name Transformation Examples
Source: https://github.com/bitovi/github-actions-aws-secrets-manager/blob/main/README.md
Illustrates how secret names containing special characters are transformed into valid environment variable names.
```bash
# If your secret name is `dev.foo`, the injected environment variable name will be `DEV_FOO`.
# If your secret name is `1/dev/foo`, the injected environment variable name will be `_1_DEV_FOO`.
# If your secret name is `dev/foo`, value is `{ "bar": "baz" }` and `parse-json` is set to `true`, the injected environment variable name will be `DEV_FOO_BAR` (and value will be `baz`).
```
--------------------------------
### JSON Parsing Examples
Source: https://github.com/bitovi/github-actions-aws-secrets-manager/blob/main/README.md
Shows how the `parse-json` option affects the injection of secrets when their values are JSON strings.
```APIDOC
Parameter: parse-json
Type: boolean
Default: false
Description: If true and the secret value is a valid stringified JSON object, it will be parsed and flattened. Each key-value pair in the flattened JSON object will become an individual secret, with the original secret name as a prefix.
Examples:
| `parse-json` | AWS Secrets Manager Secret
(`name` = `value`) | Injected Environment Variable
(`name` = `value`) | Explanation |
|--------------|--------------------------------------------------|-----------------------------------------------------|-----------------------------------------------------------------------------------------|
| `true` | `foo` = `{ "bar": "baz" }` | `FOO_BAR` = `baz` | Values that can be parsed into a JSON will be parsed and flattened |
| `true` | `1/dev/foo` = `{ "bar" = "baz" }` | `_1_DEV_FOO` = `{ "bar" = "baz" }` | Values that cannot be parsed into a JSON will NOT be parsed |
| `true` | `foo` = `{ "bar": "baz" }`
`ham` = `eggs` | `FOO_BAR` = `baz` AND
`ham` = `eggs` | If multiple secrets, values that can be parsed into a JSON will be parsed and flattened |
| `false` | `dev_foo` = `{ "bar": "baz" }` | `DEV_FOO` = `{ "bar": "baz" }` | Not parsed |
```
--------------------------------
### MIT License for String.fromCodePoint
Source: https://github.com/bitovi/github-actions-aws-secrets-manager/blob/main/dist/licenses.txt
The MIT License is a free, permissive non-copyleft software license originating at the Massachusetts Institute of Technology.
```mit
Copyright Mathias Bynens
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
```
--------------------------------
### Apache-2.0 License for aws-sdk
Source: https://github.com/bitovi/github-actions-aws-secrets-manager/blob/main/dist/licenses.txt
This snippet outlines the Apache License, Version 2.0, for the aws-sdk package, defining terms and conditions for reproduction and distribution.
```text
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
```
--------------------------------
### MIT License for @actions/core
Source: https://github.com/bitovi/github-actions-aws-secrets-manager/blob/main/dist/licenses.txt
This snippet details the MIT license terms for the @actions/core package, outlining permissions and conditions for use, modification, and distribution.
```text
The MIT License (MIT)
Copyright 2019 GitHub
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
```
--------------------------------
### Apache License 2.0
Source: https://github.com/bitovi/github-actions-aws-secrets-manager/blob/main/dist/licenses.txt
The Apache License, Version 2.0, is a permissive free software license written by the Apache Software Foundation.
```apache
Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```
```apache
Copyright 2014 James Saryerwinnie
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```
--------------------------------
### xmlbuilder MIT License
Source: https://github.com/bitovi/github-actions-aws-secrets-manager/blob/main/dist/licenses.txt
The MIT License for the xmlbuilder package. This license allows for extensive use, modification, and distribution of the software, including commercial use, provided that the copyright and permission notices are included in all copies or substantial portions of the Software.
```text
The MIT License (MIT)
Copyright (c) 2013 Ozgur Ozcitak
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
```
--------------------------------
### JMESPath License
Source: https://github.com/bitovi/github-actions-aws-secrets-manager/blob/main/dist/licenses.txt
JMESPath is a query language for JSON. This entry specifies its license.
```apache
jmespath
Apache 2.0
```
--------------------------------
### uuid MIT License
Source: https://github.com/bitovi/github-actions-aws-secrets-manager/blob/main/dist/licenses.txt
The MIT License for the uuid package. It grants broad permissions for using, copying, modifying, merging, publishing, distributing, and selling the software, with the condition that the copyright notice and permission notice are included in all copies or substantial portions of the Software.
```text
The MIT License (MIT)
Copyright (c) 2010-2016 Robert Kieffer and other contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```
--------------------------------
### xml2js MIT License
Source: https://github.com/bitovi/github-actions-aws-secrets-manager/blob/main/dist/licenses.txt
The MIT License for the xml2js package. It permits unrestricted use, copying, modification, merging, publishing, distribution, sublicensing, and selling of the software, provided that the original copyright and permission notices are retained in all copies or substantial portions of the Software.
```text
MIT
Copyright 2010, 2011, 2012, 2013. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
```
--------------------------------
### ISC License
Source: https://github.com/bitovi/github-actions-aws-secrets-manager/blob/main/dist/licenses.txt
The ISC license is a permissive free software license originating at the Internet Systems Consortium.
```isc
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
```
--------------------------------
### IAM Policy for Customer-Managed KMS Encryption
Source: https://github.com/bitovi/github-actions-aws-secrets-manager/blob/main/README.md
This IAM policy grants permissions for fetching secrets and decrypting them using a customer-managed AWS KMS key. It includes `secretsmanager:GetSecretValue` and `kms:Decrypt` actions. Access can be restricted to specific secrets and regions or use wildcards.
```json
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"secretsmanager:GetSecretValue",
"kms:Decrypt"
],
"Effect": "Allow",
"Resource": [
"arn:aws:secretsmanager:*:000000000000:secret:*",
"arn:aws:secretsmanager:us-east-1:000000000000:secret:mySecretID"
]
}
]
}
```
--------------------------------
### IAM Policy for Default Encryption
Source: https://github.com/bitovi/github-actions-aws-secrets-manager/blob/main/README.md
This IAM policy grants the necessary permissions to fetch secrets from AWS Secrets Manager when secrets are encrypted using the default AWS managed encryption key. It requires the `secretsmanager:GetSecretValue` action on all resources.
```json
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"secretsmanager:GetSecretValue"
],
"Effect": "Allow",
"Resource": "*"
}
]
}
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.