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

Add role_arn support #179

Merged
merged 24 commits into from
May 15, 2019
Merged

Add role_arn support #179

merged 24 commits into from
May 15, 2019

Conversation

tmspzz
Copy link
Owner

@tmspzz tmspzz commented Apr 4, 2019

This PR introduces the possibility to escalate privileges via STS

  • Support reading role_arn and source_profile form ~/.aws/credentials
  • Get new credentials from STS

@tmspzz tmspzz changed the title [WIP] Add role_arn support Add role_arn support Apr 14, 2019
@hlintBot
Copy link

hlintBot commented Apr 15, 2019

6 Warnings
⚠️ Big PR
⚠️ src/Lib.hs#L251 - Found Reduce duplication

let finalRepositoryMapEntries
      = if _noIgnore noIgnoreFlag then repositoryMapEntries else
          repositoryMapEntries `filterRomeFileEntriesByPlatforms`
            ignoreMapEntries
let repositoryMap = toRepositoryMap finalRepositoryMapEntries
let reverseRepositoryMap
      = toInvertedRepositoryMap finalRepositoryMapEntries
let finalIgnoreNames
      = if _noIgnore noIgnoreFlag then [] else ignoreFrameworks

Why Not

Combine with src/Lib.hs:351:5

    
⚠️ src/Lib.hs#L270 - Found Reduce duplication

let filteredCurrentMapEntries
      = currentMapEntries `filterRomeFileEntriesByPlatforms`
          ignoreMapEntries
let currentFrameworks
      = concatMap (snd . romeFileEntryToTuple) filteredCurrentMapEntries
let currentFrameworkVersions
      = map (flip FrameworkVersion currentVersion) currentFrameworks
let currentInvertedMap
      = toInvertedRepositoryMap filteredCurrentMapEntries

Why Not

Combine with src/Lib.hs:386:15

    
⚠️ src/Lib.hs#L289 - Found Redundant bracket

if _noSkipCurrent noSkipCurrentFlag then
  (currentFrameworkVersions `filterOutFrameworksAndVersionsIfNotIn`
     finalIgnoreNames)
  else []

Why Not

if _noSkipCurrent noSkipCurrentFlag then
  currentFrameworkVersions `filterOutFrameworksAndVersionsIfNotIn`
    finalIgnoreNames
  else []

    
⚠️ src/Lib.hs#L830 - Found Reduce duplication

frameworkNameWithFrameworkExtension = appendFrameworkExtensionTo f
platformBuildDirectory
  = carthageArtifactsBuildDirectoryForPlatform platform f
frameworkDirectory
  = platformBuildDirectory </> frameworkNameWithFrameworkExtension
dSYMNameWithDSYMExtension
  = frameworkNameWithFrameworkExtension <> ".dSYM"
dSYMdirectory
  = platformBuildDirectory </> dSYMNameWithDSYMExtension
bcSymbolMapPath d
  = platformBuildDirectory </> bcsymbolmapNameFrom d

Why Not

Combine with src/Lib.hs:910:3

    
⚠️ src/Lib.hs#L1216 - Found Use lambda-case

\ e ->
  case e of
      ErrorGettingDwarfUUIDs -> sayFunc $
                                  "Error: Cannot retrieve symbolmaps ids for " <> fwn
      (FailedDwarfUUIDs dwardUUIDsAndErrors) -> mapM_ (sayFunc . snd)
                                                  dwardUUIDsAndErrors

Why Not

\case
    ErrorGettingDwarfUUIDs -> sayFunc $
                                "Error: Cannot retrieve symbolmaps ids for " <> fwn
    (FailedDwarfUUIDs dwardUUIDsAndErrors) -> mapM_ (sayFunc . snd)
                                                dwardUUIDsAndErrors

    

Generated by 🚫 Danger

@tmspzz tmspzz merged commit 2ec2798 into master May 15, 2019
@tmspzz tmspzz deleted the feature/issue-175-role-arn-support branch May 15, 2019 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants